react-native-lightbox icon indicating copy to clipboard operation
react-native-lightbox copied to clipboard

closed Image question

Open songhanlin opened this issue 8 years ago • 12 comments

when the image closing, always jumped to the middle of the screen, then jump to the image starting position. my images close to left and I used renderContent

songhanlin avatar Sep 26 '17 11:09 songhanlin

so ,have you solve this ? what you did

@songhanlin I have the same problem. Did you end up finding a fix for this?

mgit7 avatar Feb 08 '18 03:02 mgit7

same issue

qiaolin-pan avatar Feb 28 '18 11:02 qiaolin-pan

Same issue, how to fix???

jzhw0130 avatar Mar 05 '18 15:03 jzhw0130

@pakyo-pan @mgit7 @OrangeFlavoredColdCoffee @songhanlin

Got a small trick to fix the problem: Set the size of Lightbox equal to the Image.

jzhw0130 avatar Mar 06 '18 06:03 jzhw0130

@jzhw0130 eh no dice

stokesbga avatar Jul 25 '18 05:07 stokesbga

Hi all, can you guys upload any gif or screenshot to illustrate the issue?

peteroid avatar Jul 25 '18 06:07 peteroid

test

@peteroid

stokesbga avatar Jul 25 '18 07:07 stokesbga

untitled2

christophby avatar Aug 01 '18 10:08 christophby

In my case it helped to add 60px (I guess it's the height of my TabBar) to the y-origin in the open()-function of the Lightbox.js (line 74)

origin: { width, height, x: px, y: py + 60, },

christophby avatar Aug 01 '18 12:08 christophby

springConfig={{ overshootClamping: true }} helps for me

andrew-stupchuk avatar Jan 18 '19 12:01 andrew-stupchuk

<Lightbox springConfig = {{tension: 30, friction: 10, overshootClamping: true }} renderContent={() => ( <Image source={{ uri: !isZoomed ? 'large_image' : 'small_image', }} style={{ width: '100%', height: '100%', objectFit: 'cover', borderRadius: 10, overflow: 'hidden', }} /> )}> <Image source={{ uri: 'small_image' }} style={{ width:70, height: 100, objectFit: 'cover',borderRadius: 10, overflow: 'hidden' }} /> </Lightbox>

and ------------->>>>>>>

Inside Lightbox.js, on line 74, this.setState at origin: { width, height, x:px, y:py+25, } - you need to change this according to yourself. When I set y:py + 25 it works fine.

ghost avatar Jan 17 '24 11:01 ghost