Make double tap gestures ignore clicks that are *too* fast (accidental, finger skidding, etc.)

This commit is contained in:
Septicity committed 2026-04-14 05:25:33 -05:00
1 parent 2d57445fe0
commit 47ccb529d4
1 file changed
+1 -1
+1 -1
View File
@@ -128,7 +128,7 @@ export const useImageGestures = (active: boolean, step = 0.2, min = 0.1, max = 5
// Double click zoom
const now = Date.now();
if (now - lastTapRef.current < 300) {
if (now - lastTapRef.current < 300 && now - lastTapRef.current > 30) {
// If two cursors are active, this isn't a double click.
if (activePointers.current.size === 2) {
const points = Array.from(activePointers.current.values());