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

Erratic zooming when target element is much larger than its container #672

Open
Jaszuro opened this issue Nov 5, 2024 · 0 comments
Open

Comments

@Jaszuro
Copy link

Jaszuro commented Nov 5, 2024

Describe the bug

If the target element is much larger than its container, then when zoomed out, zooming with pinching messes up the whole "scene" as the focal point is wrong and zoom speed gets significantly increased. Check out this JSFiddle. Pinch-zoom out to see the whole green element inside the blue container, then release, then pinch-zoom again. The focal point seems to be somewhere in the top-left area instead of the correct position.

Your environment

  • Version of panzoom: 4.5.1
  • Browser and browser version: Chrome, 130.0.6723.92 (Official Build) (64-bit)

Expected behavior

Pinch-zooming should behave as intuition tells us.

Actual behavior

Pinch-zooming goes haywire, the target element goes out of the container, zooming "speeds up" significantly.

Steps to reproduce

Check out the JSFiddle above.

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