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

Pinch and pan simultaneously #606

Closed
seme1 opened this issue Jan 27, 2022 · 4 comments · Fixed by #607
Closed

Pinch and pan simultaneously #606

seme1 opened this issue Jan 27, 2022 · 4 comments · Fixed by #607
Labels

Comments

@seme1
Copy link

seme1 commented Jan 27, 2022

Describe the bug

I had an old version of panzoom (jquery plugin) that worked without any issues. After upgrading to the new non-jquery panzoom, I'm no longer able to pinch and pan the image in the same time.

Below videos show the behavior in the old panzoom
https://www.youtube.com/shorts/KJRl4xU--FY?feature=share

And the behavior in the new version of panzoom
https://www.youtube.com/shorts/FhQcH7fGCw0

It would be appreciated to illustrate how to replicate the old behavior with the new version of panzoom (if at all possible). If not, what are my best alternatives ? I am forced to upgrade as the old version is giving too many errors in the console of new Chrome about touch events being ignored while scrolling (even though it works without any issues).

@seme1 seme1 changed the title Pinch and pan Pinch and pan simultaneously Jan 27, 2022
@timmywil
Copy link
Owner

Thanks for opening an issue. That behavior was removed recently. Specifically, in version 4.4.1. It was done to fix this issue. The new version of Panzoom relies fully on the browser for dimensions of the panzoom element, which was not true of the old jQuery plugin. This solved a lot of other issues and significantly reduced code complexity, but means that changes need to be painted before another change can be made. That's fine in most cases, except for something like this, where the goal would be to both zoom to a point between two fingers and pan it if those fingers move. That said, I wonder if there's a way to accomplish in the current version. But first, please try version 4.4.0 and see if that works for your use case.

I will reopen if any code changes come from this.

@timmywil timmywil added feature votes needed Feature requests are closed at first, but will be implemented with enough upvotes labels Jan 27, 2022
@timmywil
Copy link
Owner

I'll add votes needed to gauge interest in this behavior. Some people don't like it.

@seme1
Copy link
Author

seme1 commented Jan 28, 2022

Thank you very much for the fast response. I just tried version 4.4.0 and it worked perfectly fine (with the desired behavior).
Perhaps an option to disable the fix introduced in this issue would help in future versions of panzoom ?

@timmywil
Copy link
Owner

I thought about this more. I was originally thinking of #512 as a bug fix, but it did change behavior. You could argue I should have done a major release. To that end, I'll add an option to 4.4.x to put this behavior back. I can't promise the option won't get removed in a future major version. It depends on whether I can get it to work for the use case in the #512.

@timmywil timmywil reopened this Jan 28, 2022
@timmywil timmywil removed the votes needed Feature requests are closed at first, but will be implemented with enough upvotes label Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants