Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image jumps when you start dragging #12

Open
pi-kei opened this issue May 19, 2021 · 5 comments
Open

Image jumps when you start dragging #12

pi-kei opened this issue May 19, 2021 · 5 comments

Comments

@pi-kei
Copy link

pi-kei commented May 19, 2021

Steps to reproduce:

  1. You need 2 images
  2. Select the first one, zoom in and drag it out of center and leave it there
  3. Select the second one, zoom in and start dragging
  4. 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.

@theanam
Copy link
Owner

theanam commented Aug 21, 2021

Sorry for the late followup, could you share the device details?

@pi-kei
Copy link
Author

pi-kei commented Aug 21, 2021

Sorry for the late followup, could you share the device details?

Latest desktop version of Chrome.

@pi-kei
Copy link
Author

pi-kei commented Aug 21, 2021

Here is a GIF
XAoJg1m3qu

@mathieu-nomadeec
Copy link

mathieu-nomadeec commented Aug 23, 2021

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.

@mathieu-nomadeec
Copy link

mathieu-nomadeec commented Aug 24, 2021

I did a Pull Request to fix this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants