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

fix: fix transform origin of zoom.in() function #7904

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

m-kawafuji
Copy link

@m-kawafuji m-kawafuji commented Feb 21, 2025

This PR fixes #7903

  • zoom.in function sets an unexpected transform3d value to the .swiper-zoom-container element, if the previous scale value is greater than 1 and the position of the image is not centered.
  • The origin of the image should be preserved after zoom.in function is called, as if transform-origin was center;

Reproduction

CodeSandbox: https://codesandbox.io/p/sandbox/swiper-zoom-forked-w4jlgg

zoom-in.mp4

This PR

This PR fixes the issue.

zoom-in-pr.mp4

`zoom.in()` function sets an unexpected `transform3d()` value to the
`.swiper-zoom-container` element.
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

Successfully merging this pull request may close these issues.

zoom.in function sets an unexpected translate3d value to the .swiper-zoom-container
1 participant