-
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
Hi, thank you for all the great work! I use this package for zooming and panning in a user interface, and it works wonderfully.
The only issue I have is that the onWheel event handles both the scrolling and the pinch-to-zoom gestures, whereas it would be preferable if scrolling were still possible, as it is for example in the zoom-and-pan interfaces of Sketch and Metro.io.
According to this article, the solution could be to add (D.field "ctrlKey" D.bool) to the decoder in the onWheel function:
When you perform a pinch-zoom gesture, Firefox and Chrome produce a wheel event with a
deltaY: ±scale,ctrlKey: true.
If ctrlKey is False, the message could be a NoOp and the preventDefault in the event listener could be removed to allow scrolling.
Metadata
Metadata
Assignees
Labels
No labels