Disable animation native driver in AnimatedGratuisousApp of RNTester (#23172)
Summary: `Animated.event` not work with direct events and not bubbling events, which means it does not work with `PanResponder`, please see [Animation Caveats](https://facebook.github.io/react-native/docs/animations#caveats) Changelog: ---------- [General] [Fixed] - Disable animation native driver in AnimatedGratuisousApp of RNTester. Pull Request resolved: https://github.com/facebook/react-native/pull/23172 Differential Revision: D13838555 Pulled By: cpojer fbshipit-source-id: 866bc83e780d6712ffae5964615af44a72bf998c
This commit is contained in:
parent
b0302eca24
commit
8508da425e
|
@ -77,12 +77,10 @@ class AnExSet extends React.Component<Object, any> {
|
|||
inputRange: [0, 300], // and interpolate pixel distance
|
||||
outputRange: [1, 0], // to a fraction.
|
||||
}),
|
||||
useNativeDriver: true,
|
||||
}).start();
|
||||
},
|
||||
onPanResponderMove: Animated.event(
|
||||
[null, {dy: this.state.dismissY}], // track pan gesture
|
||||
{useNativeDriver: true},
|
||||
),
|
||||
onPanResponderRelease: (e, gestureState) => {
|
||||
if (gestureState.dy > 100) {
|
||||
|
@ -90,7 +88,6 @@ class AnExSet extends React.Component<Object, any> {
|
|||
} else {
|
||||
Animated.spring(this.props.openVal, {
|
||||
toValue: 1, // animate back open if released early
|
||||
useNativeDriver: true,
|
||||
}).start();
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue