Open nolanlawson opened 5 years ago
I would love to have this feature as well. @jakearchibald have you might consider implementing this?
Hey, I made a pull request to do something like that: https://github.com/GoogleChromeLabs/pinch-zoom/pull/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.
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 likedisabled="true"
/disabled="false"
:Presumably this would just attach/unattach the listeners, or have the listeners do nothing, or something like that.