From 7ce4c821e56da2eb6098cf73d0d97d6fe69cc7af Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Mon, 12 Dec 2022 11:11:37 -0600 Subject: [PATCH] Tune the swipe gesture to detect more easily --- src/view/com/util/gestures/HorzSwipe.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/view/com/util/gestures/HorzSwipe.tsx b/src/view/com/util/gestures/HorzSwipe.tsx index 82b230bf29..8caa3dea84 100644 --- a/src/view/com/util/gestures/HorzSwipe.tsx +++ b/src/view/com/util/gestures/HorzSwipe.tsx @@ -48,8 +48,8 @@ export function HorzSwipe({ gestureState: PanResponderGestureState, ) => { return ( - Math.abs(gestureState.dx) > Math.abs(gestureState.dy * 1.5) && - Math.abs(gestureState.vx) > Math.abs(gestureState.vy * 1.5) + Math.abs(gestureState.dx) > Math.abs(gestureState.dy * 1.25) && + Math.abs(gestureState.vx) > Math.abs(gestureState.vy * 1.25) ) } @@ -113,7 +113,7 @@ export function HorzSwipe({ if ( Math.abs(gestureState.dx) > Math.abs(gestureState.dy) && Math.abs(gestureState.vx) > Math.abs(gestureState.vy) && - (Math.abs(gestureState.dx) > swipeDistanceThreshold / 3 || + (Math.abs(gestureState.dx) > swipeDistanceThreshold / 4 || Math.abs(gestureState.vx) > swipeVelocityThreshold) ) { const final = ((gestureState.dx / Math.abs(gestureState.dx)) * -1) | 0