'How do we configure hammerjs pinch in/out speed?
I am using hammerjs pinch in/out on my SVG element. Currently on single pinch out it is zooming out the maximum but I would like to configure the speed so that I can restrict the zoom based on my step (e.g. 1 step-20% zoom).
Solution 1:[1]
You can do something like this in your pinch event, it will cut the pinch speed in half:
this.pinchScale = (event.scale / 2) + 1
And reactively in your container:
width: `${this.containerWidth * this.pinchScale}px`,
height: `${this.containerHeight * this.pinchScale}px`,
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | rodurico |
