mirror of
https://github.com/status-im/react-native.git
synced 2025-01-29 02:35:41 +00:00
Revert D4321763: Use native driver even if gestures are enabled
Differential Revision: D4321763 fbshipit-source-id: b43a733ea2234dd46add817bb83cca366ef83093
This commit is contained in:
parent
eb43f155b4
commit
cbc413ba87
@ -32,6 +32,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
const NativeAnimatedModule = require('NativeModules').NativeAnimatedModule;
|
||||||
const NavigationCard = require('NavigationCard');
|
const NavigationCard = require('NavigationCard');
|
||||||
const NavigationCardStackPanResponder = require('NavigationCardStackPanResponder');
|
const NavigationCardStackPanResponder = require('NavigationCardStackPanResponder');
|
||||||
const NavigationCardStackStyleInterpolator = require('NavigationCardStackStyleInterpolator');
|
const NavigationCardStackStyleInterpolator = require('NavigationCardStackStyleInterpolator');
|
||||||
@ -220,7 +221,16 @@ class NavigationCardStack extends React.Component<DefaultProps, Props, void> {
|
|||||||
_configureTransition = () => {
|
_configureTransition = () => {
|
||||||
const isVertical = this.props.direction === 'vertical';
|
const isVertical = this.props.direction === 'vertical';
|
||||||
const animationConfig = {};
|
const animationConfig = {};
|
||||||
if (NavigationCardStackStyleInterpolator.canUseNativeDriver(isVertical)) {
|
if (
|
||||||
|
!!NativeAnimatedModule
|
||||||
|
|
||||||
|
// Gestures do not work with the current iteration of native animation
|
||||||
|
// driving. When gestures are disabled, we can drive natively.
|
||||||
|
&& !this.props.enableGestures
|
||||||
|
|
||||||
|
// Native animation support also depends on the transforms used:
|
||||||
|
&& NavigationCardStackStyleInterpolator.canUseNativeDriver(isVertical)
|
||||||
|
) {
|
||||||
animationConfig.useNativeDriver = true;
|
animationConfig.useNativeDriver = true;
|
||||||
}
|
}
|
||||||
return animationConfig;
|
return animationConfig;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user