mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-24 04:25:34 +08:00
chore: sync latest stack
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
"devDependencies": {
|
||||
"@react-native-community/bob": "^0.10.0",
|
||||
"@react-native-community/masked-view": "^0.1.7",
|
||||
"@react-navigation/stack": "^5.2.2",
|
||||
"@react-navigation/stack": "^5.2.3",
|
||||
"@types/color": "^3.0.1",
|
||||
"@types/react": "^16.9.23",
|
||||
"@types/react-native": "^0.61.22",
|
||||
|
||||
15
packages/stack/src/vendor/views/Stack/Card.tsx
vendored
15
packages/stack/src/vendor/views/Stack/Card.tsx
vendored
@@ -271,16 +271,15 @@ export default class Card extends React.Component<Props> {
|
||||
velocity = nativeEvent.velocityX;
|
||||
}
|
||||
|
||||
if (
|
||||
gestureDirection === 'horizontal-inverted' ||
|
||||
gestureDirection === 'vertical-inverted'
|
||||
) {
|
||||
translation *= -1;
|
||||
velocity *= -1;
|
||||
}
|
||||
const gestureDirectionFactor =
|
||||
gestureDirection === 'horizontal' || gestureDirection === 'vertical'
|
||||
? 1
|
||||
: -1;
|
||||
|
||||
const closing =
|
||||
translation + velocity * gestureVelocityImpact > distance / 2
|
||||
gestureDirectionFactor *
|
||||
(translation + velocity * gestureVelocityImpact) >
|
||||
distance / 2
|
||||
? velocity !== 0 || translation !== 0
|
||||
: false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user