Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Commit

Permalink
fix: use gesture direction when using next screen's animation
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Jan 3, 2020
1 parent 15fe3eb commit 572beae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/stack/src/views/Stack/CardStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ export default class CardStack extends React.Component<Props, State> {
: ({} as StackNavigationOptions);

let transitionConfig = {
gestureDirection,
transitionSpec,
cardStyleInterpolator,
headerStyleInterpolator,
Expand All @@ -461,6 +462,7 @@ export default class CardStack extends React.Component<Props, State> {
if (nextScene) {
const {
animationEnabled,
gestureDirection = defaultTransitionPreset.gestureDirection,
transitionSpec = defaultTransitionPreset.transitionSpec,
cardStyleInterpolator = animationEnabled === false
? forNoAnimationCard
Expand All @@ -471,6 +473,7 @@ export default class CardStack extends React.Component<Props, State> {
: ({} as StackNavigationOptions);

transitionConfig = {
gestureDirection,
transitionSpec,
cardStyleInterpolator,
headerStyleInterpolator,
Expand Down Expand Up @@ -527,7 +530,6 @@ export default class CardStack extends React.Component<Props, State> {
onTransitionEnd={onTransitionEnd}
gestureEnabled={index !== 0 && getGesturesEnabled({ route })}
gestureVelocityImpact={gestureVelocityImpact}
gestureDirection={gestureDirection}
{...transitionConfig}
/>
</MaybeScreen>
Expand Down

0 comments on commit 572beae

Please sign in to comment.