react-awesome-lightbox
react-awesome-lightbox copied to clipboard
Image jumps when you start dragging
Steps to reproduce:
- You need 2 images
- Select the first one, zoom in and drag it out of center and leave it there
- Select the second one, zoom in and start dragging
- Your image jumps
I guess when you end dragging you have to reset initX, initY or lastX, lastY or both. I'm not sure about that.
Sorry for the late followup, could you share the device details?
Sorry for the late followup, could you share the device details?
Latest desktop version of Chrome.
Here is a GIF
Its the same when u have one only image, I think the reset button does not fully reset previous position, so when u click 2nd image, the position start again at the previous one. I looked few minutes your code, its pretty cool ^^ You may need to reset lastX and lastY in your navigateImage and resetZoom methods.
I did a Pull Request to fix this issue