mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-24 04:25:34 +08:00
fix: reset velocity if no modal animation
This commit is contained in:
@@ -104,6 +104,7 @@ const GESTURE_RESPONSE_DISTANCE_VERTICAL = 135;
|
||||
const {
|
||||
abs,
|
||||
add,
|
||||
and,
|
||||
block,
|
||||
call,
|
||||
cond,
|
||||
@@ -679,6 +680,13 @@ export default class Card extends React.Component<Props> {
|
||||
this.isSwipeCancelled,
|
||||
eq(this.gestureState, GestureState.CANCELLED)
|
||||
),
|
||||
cond(
|
||||
and(
|
||||
eq(this.gestureState, GestureState.END),
|
||||
lessThan(this.velocity, 0)
|
||||
),
|
||||
[set(this.velocity, 0), set(this.velocityUntraversed, 0)]
|
||||
),
|
||||
set(this.isSwiping, FALSE_NODE),
|
||||
this.runTransition(
|
||||
cond(
|
||||
|
||||
Reference in New Issue
Block a user