Use native animations if the animated value is native in NavigationCardStackPanResponder

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 #10643 and #10642 for everything to work properly.
Closes https://github.com/facebook/react-native/pull/10641

Differential Revision: D4135972

Pulled By: ericvicenti

fbshipit-source-id: 8e65574ebb296da044f4d03bf1eedee4a37ebdac
This commit is contained in:
Janic Duplessis 2016-11-04 20:18:21 -07:00 committed by Facebook Github Bot
parent f29e3bc277
commit e173f14b52
1 changed files with 1 additions and 0 deletions

View File

@ -206,6 +206,7 @@ class NavigationCardStackPanResponder extends NavigationAbstractPanResponder {
{ {
toValue: props.navigationState.index, toValue: props.navigationState.index,
duration: ANIMATION_DURATION, duration: ANIMATION_DURATION,
useNativeDriver: props.position.__isNative,
} }
).start(); ).start();
} }