chore: sync latest stack

This commit is contained in:
Satyajit Sahoo
2020-03-20 11:40:21 +01:00
parent 915861e601
commit 72bbebc80e
3 changed files with 12 additions and 13 deletions

View File

@@ -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",

View File

@@ -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;