mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-30 17:33:21 +08:00
Faster animation
Summary: Reduce auto-swipe animation duration to 200 ms to increase swipe speed. Reviewed By: zjj010104 Differential Revision: D3333942 fbshipit-source-id: a9e0b15926ef854adcd9e1d2c1e67fd080139d84
This commit is contained in:
committed by
Facebook Github Bot 9
parent
1767a0a828
commit
ca71143ff4
@@ -37,6 +37,8 @@ const emptyFunction = require('emptyFunction');
|
||||
const CLOSED_LEFT_POSITION = 0;
|
||||
// Minimum swipe distance before we recognize it as such
|
||||
const HORIZONTAL_SWIPE_DISTANCE_THRESHOLD = 15;
|
||||
// Time, in milliseconds, of how long the animated swipe should be
|
||||
const SWIPE_DURATION = 200;
|
||||
|
||||
/**
|
||||
* Creates a swipable row that allows taps on the main item and a custom View
|
||||
@@ -184,6 +186,7 @@ const SwipeableRow = React.createClass({
|
||||
Animated.timing(
|
||||
this.state.currentLeft,
|
||||
{
|
||||
duration: SWIPE_DURATION,
|
||||
toValue: toValue,
|
||||
},
|
||||
).start(() => {
|
||||
|
||||
Reference in New Issue
Block a user