diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-12-12 11:11:37 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-12-12 11:11:37 -0600 |
commit | 2b27be31e60e3074ffd047099ea5b246753ac782 (patch) | |
tree | 527662dfea05573fdce30829bd3793ae379764d2 /src | |
parent | 03d9fd3179f9224afe08bce930a1133f5ad2f7b2 (diff) | |
download | voidsky-2b27be31e60e3074ffd047099ea5b246753ac782.tar.zst |
Tune the swipe gesture to detect more easily
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/util/gestures/HorzSwipe.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/view/com/util/gestures/HorzSwipe.tsx b/src/view/com/util/gestures/HorzSwipe.tsx index 82b230bf2..8caa3dea8 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 |