Skip to content

Commit

Permalink
Fix typo -- movedDistance moveX, moveY -> dy/dx (react-navigation#1824)
Browse files Browse the repository at this point in the history
  • Loading branch information
nihgwu authored and skevy committed Jun 23, 2017
1 parent d29dc05 commit c61d72f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/views/CardStack.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,10 @@ class CardStack extends Component {
const axisDistance = isVertical
? layout.height.__getValue()
: layout.width.__getValue();
const movedDistance = gesture[isVertical ? 'moveY' : 'moveX'];
const defaultVelocity = axisDistance / ANIMATION_DURATION;
const movedDistance = gesture[isVertical ? 'dy' : 'dx'];
const gestureVelocity = gesture[isVertical ? 'vy' : 'vx'];
const velocity = Math.max(gestureVelocity, defaultVelocity);
const defaultVelocity = axisDistance / ANIMATION_DURATION;
const velocity = Math.max(Math.abs(gestureVelocity), defaultVelocity);
const resetDuration = movedDistance / velocity;
const goBackDuration = (axisDistance - movedDistance) / velocity;

Expand Down

0 comments on commit c61d72f

Please sign in to comment.