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 wrong center point on pinch zoom #2158

Merged
merged 1 commit into from
May 12, 2022
Merged

Conversation

cavenel
Copy link
Contributor

@cavenel cavenel commented May 12, 2022

When doing pinch to zoom, we need to pan first and then zoom, so that the center point is correct (i.e. the center of the two touch positions).
Otherwise, the pan is computed on the unzoomed coordinates, giving an impression of zooming toward the center.
See issue #2141

When doing pinch to zoom, we need to do pan first and then zoom, so that the center point is correct.
Otherwise, the pan will computed on the unzoomed coordinates, giving an impression of zooming toward the center
Copy link
Member

@iangilman iangilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brilliant! Thank you for figuring this out!

@iangilman iangilman merged commit f3f20fd into openseadragon:master May 12, 2022
iangilman added a commit that referenced this pull request May 12, 2022
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.

2 participants