You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by ElectricPulse June 18, 2024
I am working on a custom html canvas library. I wanted to use react-use-gesture for the zooming, dragging on the canvas.
For zooming I used the usePinch hook which crucially provides event.origin (which useWheel doesn't). usePinch with a wheel needs to know the actual offset and spins off to crazy numbers if improper scaleBounds are set. Letting usePinch control the offset state causes a couple implementation issues.
I need a reset view button -> I need to be able to reset pinch offset.
I need to change the sensitivity of the pinch (this can't be done in the handler)
I also don't want the behaviour where zoom is reset upon the first unpinch when zoomed in.
The text was updated successfully, but these errors were encountered:
Discussed in #669
Originally posted by ElectricPulse June 18, 2024
I am working on a custom html canvas library. I wanted to use react-use-gesture for the zooming, dragging on the canvas.
For zooming I used the usePinch hook which crucially provides event.origin (which useWheel doesn't). usePinch with a wheel needs to know the actual offset and spins off to crazy numbers if improper scaleBounds are set. Letting usePinch control the offset state causes a couple implementation issues.
The text was updated successfully, but these errors were encountered: