Skip to content

Commit

Permalink
Use native animations if the animated value is native in NavigationCa…
Browse files Browse the repository at this point in the history
…rdStackPanResponder

Summary:
Since native and non-native animations do not work together check if the animated value is native and set useNativeDriver accordingly. So untill we move to always using the native driver this is needed. This and another fix in NativeAnimations module will allow using native animations to transitions with gestures.

**Test plan**
Tested in an app that uses native driven animations with a back gesture. This also needs facebook#10643 and facebook#10642 for everything to work properly.
Closes facebook#10641

Differential Revision: D4135972

Pulled By: ericvicenti

fbshipit-source-id: 8e65574ebb296da044f4d03bf1eedee4a37ebdac
  • Loading branch information
janicduplessis authored and mlguys committed Nov 8, 2016
1 parent 12b9ae9 commit 13d98cf
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ class NavigationCardStackPanResponder extends NavigationAbstractPanResponder {
{
toValue: props.navigationState.index,
duration: ANIMATION_DURATION,
useNativeDriver: props.position.__isNative,
}
).start();
}
Expand Down

0 comments on commit 13d98cf

Please sign in to comment.