Skip to content

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

Merged
nolimits4web merged 1 commit intonolimits4web:masterfrom
m-kawafuji:fix/zoom-in-transform-origin
Mar 3, 2025
Merged

fix: fix transform origin of zoom.in() function#7904
nolimits4web merged 1 commit intonolimits4web:masterfrom
m-kawafuji:fix/zoom-in-transform-origin

Conversation

@m-kawafuji
Copy link
Copy Markdown
Contributor

@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.
@nolimits4web
Copy link
Copy Markdown
Owner

t0ggles-create swiper

@t0ggles
Copy link
Copy Markdown

t0ggles bot commented Feb 26, 2025

Task nolimits4web/SWIPER-159 was created

t0ggles task SWIPER-159

@t0ggles t0ggles bot added the t0ggles Linked to the t0ggles task label Feb 26, 2025
@nolimits4web nolimits4web merged commit f7febe1 into nolimits4web:master Mar 3, 2025
3 checks passed
@t0ggles
Copy link
Copy Markdown

t0ggles bot commented Mar 3, 2025

Task nolimits4web/SWIPER-159 status changed to Done

@nolimits4web
Copy link
Copy Markdown
Owner

Merged, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t0ggles Linked to the t0ggles task

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

2 participants