File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -227,13 +227,7 @@ class SwipeableItem<T> extends React.PureComponent<Props<T>> {
227227 onHandlerStateChange = event ( [
228228 {
229229 nativeEvent : ( { state } : GestureHandlerStateChangeNativeEvent ) =>
230- block ( [
231- set ( this . gestureState , state ) ,
232- cond (
233- eq ( this . gestureState , GestureState . BEGAN ) ,
234- set ( this . prevTranslate , this . animState . position )
235- )
236- ] )
230+ set ( this . gestureState , state )
237231 }
238232 ] ) ;
239233
@@ -308,6 +302,13 @@ class SwipeableItem<T> extends React.PureComponent<Props<T>> {
308302 startClock ( this . clock )
309303 ] )
310304 ] ) ,
305+ onChange (
306+ this . gestureState ,
307+ cond ( eq ( this . gestureState , GestureState . BEGAN ) , [
308+ cond ( clockRunning ( this . clock ) , stopClock ( this . clock ) ) ,
309+ set ( this . prevTranslate , this . animState . position )
310+ ] )
311+ ) ,
311312 onChange ( this . isSwiping , call ( [ this . isSwiping ] , this . onIsSwipingChange ) ) ,
312313 // If the clock is running, increment position in next tick by calling spring()
313314 cond ( clockRunning ( this . clock ) , [
You can’t perform that action at this time.
0 commit comments