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

Zoom with pinch doesn't translate the image following the fingers #6371

Closed
5 of 6 tasks
MRamonLeon opened this issue Feb 8, 2023 · 0 comments
Closed
5 of 6 tasks

Comments

@MRamonLeon
Copy link
Contributor

Check that this is really a bug

  • I confirm

Reproduction link

https://swiperjs.com/demos/400-zoom/core

Bug description

The code on onGestureChange and onGestureEnd doesn't use the gesture position to move the image to that pixel so that the zoom takes place at this specific point, instead of the center of the image. Therefore, the zoom doesn't happen where expected. I can see they're taken into account on the onTouchMove function, but anyway the zoom doesn't honor the fingers position.

Expected Behavior

The pinching gesture zoom in the image on this specific point.

Actual Behavior

The image zoom in focusing on the center of the image when using the fingers.

Swiper version

8.4.5

Platform/Target and Browser Versions

Safari@iPhone 12 Pro Max

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
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

1 participant