mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-20 09:01:17 -08:00
Make double tap gestures ignore clicks that are *too* fast (accidental, finger skidding, etc.)
This commit is contained in:
1 parent
2d57445fe0
commit
47ccb529d4
1 file changed
+1
-1
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user