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

Feature request: ability to disable pinch-zooming #11

Open
nolanlawson opened this issue Feb 10, 2019 · 2 comments
Open

Feature request: ability to disable pinch-zooming #11

nolanlawson opened this issue Feb 10, 2019 · 2 comments

Comments

@nolanlawson
Copy link
Contributor

As I describe in this blog post, sometimes it's nice to be able to toggle the pinch-zoom functionality on and off, for instance when the <pinch-zoom> is part of a scrollable list, and you normally want single-pointer events to scroll the list rather than move the zoomable element.

As is, you can simply swap <pinch-zoom> with its contents, but it would be fewer DOM operations to just toggle something like disabled="true" / disabled="false":

<pinch-zoom disabled="true">
  <my-element></my-element>
</pinch-zoom

Presumably this would just attach/unattach the listeners, or have the listeners do nothing, or something like that.

@eMarek
Copy link

eMarek commented Aug 31, 2020

I would love to have this feature as well. @jakearchibald have you might consider implementing this?

@edman007
Copy link

Hey, I made a pull request to do something like that: #26

with no-default-pan="true" one finger scrolling of the page still works until you start pinch zooming, then it switches behaviours, i also added two-finger-pan="true" which just makes it so one finger scrolling scrolls the page, and two finger pans the element.

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

3 participants