forked from Mirrors/elk
fix: limit pinch scale to minimum 0.5 (#1740)
This commit is contained in:
parent
33a53de8d7
commit
769b84867a
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ const { isSwiping, lengthX, lengthY, direction } = useSwipe(target, {
|
|||
|
||||
useGesture({
|
||||
onPinch({ offset: [distance, angle] }) {
|
||||
set({ scale: 1 + distance / 200 })
|
||||
set({ scale: Math.max(0.5, 1 + distance / 200) })
|
||||
},
|
||||
onMove({ movement: [x, y], dragging, pinching }) {
|
||||
if (dragging && !pinching)
|
||||
|
|
Loading…
Reference in a new issue