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

Jitter on touch devices when zooming out 'beyond the limit'. #649

Closed
chuckntaylor opened this issue Jun 3, 2023 · 2 comments
Closed

Jitter on touch devices when zooming out 'beyond the limit'. #649

chuckntaylor opened this issue Jun 3, 2023 · 2 comments
Labels

Comments

@chuckntaylor
Copy link

Describe the bug

On touch devices, I am experiencing some shaking of the 'scene' when I pinch zoom-out and hit the 'zoom out' limit (scale of 1.0000). I have set contain : 'outside'

Attached is a video

This does not happen when I hit the limit of zooming in on a touch device, and does not happen when using a mouse on desktop. It is really when I zoom in a bit, and then zoom out 'beyond the limit'.

in the panzoomzoom event, I do see that event.detail.scale and event.detail.x / event.detail.y jump around a lot during this glitch. Once it has settled at zoomed out all the way, and I have stopped touching the device, If I then go to zoom out more, no jitter happens. I really need to zoom in a bit first, then zoom out beyond the limit in order to make this jitter show.

Perhaps I can address this in one of the event listeners?

Your environment

  • Version of panzoom - ^4.5.1
  • Browser and browser version iOS 16.5

Expected behavior

Not shake.

Actual behavior

See the video.

Steps to reproduce

@chuckntaylor
Copy link
Author

I seemed to have solved this by setting minScale: 1

@BierDav
Copy link

BierDav commented Jun 13, 2024

minScale: 1 doesn't always work, in addition it may be required to wrap the img you passed in an empty div. I don't know why, but it solves the issue, maybe there is an underlying bug that can be fixed there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants