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

Snap image back into frame not working

Open dmenonPearson opened this issue 6 years ago • 1 comments

Reporting a Bug as seen in the demo page of this application: https://fritz-c.github.io/react-image-lightbox/

Go to the third image in the sequence. Zoom it twice. Now try to drag it to the right all the way. The image goes out of the window and never snaps back.

Thanks!

dmenonPearson avatar Mar 14 '18 05:03 dmenonPearson

The cause, why the image not snap back is the calculation of the frame. The larger the image, the wider the corner distance.

https://codesandbox.io/s/l9n3vnz8yz

And if your image "too large" the corner of the frame will be positioned outside the screen.

BuckUbel avatar Jan 15 '19 07:01 BuckUbel