Skip to content

Commit

Permalink
chore: sync latest stack
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Mar 20, 2020
1 parent 915861e commit 72bbebc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/stack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
15 changes: 7 additions & 8 deletions packages/stack/src/vendor/views/Stack/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3268,10 +3268,10 @@
resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.7.tgz#a65ce0702f55cb67fd777995de6fc7b3e5781903"
integrity sha512-9KbP7LTLFz9dx1heURJbO6nuVMdSjDez8znlrUzaB1nUwKVsTTwlKRuHxGUYIIkReLWrJQeCv9tidy+84z2eCw==

"@react-navigation/stack@^5.2.2":
version "5.2.2"
resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.2.2.tgz#2ad170250c9e4eb9715d3fa05d780f47d9c2644d"
integrity sha512-9xBIIDuGFtPTKfESQ0xPxCRACngcLSMJYWql583v8HRZidT4fdOlIKbmhNZ+iPhwvRbjDm/mxMat7R9CBakoDg==
"@react-navigation/stack@^5.2.3":
version "5.2.3"
resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.2.3.tgz#2c92ee6f0a032720960acfa037e13061c378781e"
integrity sha512-mCji6N6r03sTMF09hbVmhdCZHcuIrZCr/MY8yuiG+kzzYcFfj+72wwJ885erKw32jBKAaJV8wZNq8W0K+ZiCQQ==
dependencies:
color "^3.1.2"
react-native-iphone-x-helper "^1.2.1"
Expand Down

0 comments on commit 72bbebc

Please sign in to comment.