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:
Fred Liu 2016-05-23 10:21:07 -07:00 committed by Facebook Github Bot 9
parent 1767a0a828
commit ca71143ff4

View File

@ -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(() => {