mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-05-14 23:53:33 +08:00
fix: fix closing stack using inverted gesture. (#7824)
Co-authored-by: Satyajit Sahoo <satyajit.happy@gmail.com>
This commit is contained in:
@@ -271,6 +271,14 @@ export default class Card extends React.Component<Props> {
|
||||
velocity = nativeEvent.velocityX;
|
||||
}
|
||||
|
||||
if (
|
||||
gestureDirection === 'horizontal-inverted' ||
|
||||
gestureDirection === 'vertical-inverted'
|
||||
) {
|
||||
translation *= -1;
|
||||
velocity *= -1;
|
||||
}
|
||||
|
||||
const closing =
|
||||
translation + velocity * gestureVelocityImpact > distance / 2
|
||||
? velocity !== 0 || translation !== 0
|
||||
|
||||
Reference in New Issue
Block a user