Skip to content

Commit ab52de6

Browse files
fred2028Facebook Github Bot 6
authored andcommitted
More sensitive swipe gesture recognition
Summary: I noticed sometimes the swipeable row prioritizes the list view's vertical scroll too much, or returns to closed position if swiped a little distance but at high velocity. These new thresholds help both cases. Reviewed By: hedgerwang Differential Revision: D3441994 fbshipit-source-id: 84a9fdf63a33b3047a9a0205e87d8c489e9a6631
1 parent 12a87b6 commit ab52de6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Libraries/Experimental/SwipeableRow/SwipeableRow.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ const emptyFunction = require('fbjs/lib/emptyFunction');
3939
// Position of the left of the swipable item when closed
4040
const CLOSED_LEFT_POSITION = 0;
4141
// Minimum swipe distance before we recognize it as such
42-
const HORIZONTAL_SWIPE_DISTANCE_THRESHOLD = 15;
42+
const HORIZONTAL_SWIPE_DISTANCE_THRESHOLD = 10;
4343
// Minimum swipe speed before we fully animate the user's action (open/close)
44-
const HORIZONTAL_FULL_SWIPE_SPEED_THRESHOLD = 0.5;
44+
const HORIZONTAL_FULL_SWIPE_SPEED_THRESHOLD = 0.3;
4545
// Factor to divide by to get slow speed; i.e. 4 means 1/4 of full speed
4646
const SLOW_SPEED_SWIPE_FACTOR = 4;
4747
// Time, in milliseconds, of how long the animated swipe should be

0 commit comments

Comments
 (0)