fix gratuitous app crash
Summary: Now it fails <img src="https://cloud.githubusercontent.com/assets/1488195/22402686/1bb46f5a-e61a-11e6-9c4a-7b01e7f89508.gif" width="300"/> **Test plan (required)** UIExplorer Closes https://github.com/facebook/react-native/pull/12110 Differential Revision: D4480641 fbshipit-source-id: c9941e9cc2f0624c7120cfb17a3534c92207bf7a
This commit is contained in:
parent
af5c21b1ef
commit
412acd237a
|
@ -69,18 +69,27 @@ class AnExScroll extends React.Component {
|
|||
<Animated.Image
|
||||
pointerEvents="none"
|
||||
style={[styles.bunny, {transform: [
|
||||
{translateX: this.state.scrollX.interpolate({
|
||||
inputRange: [0, width, 2 * width],
|
||||
outputRange: [0, 0, width / 3]}), // multi-part ranges
|
||||
extrapolate: 'clamp'}, // default is 'extend'
|
||||
{translateY: this.state.scrollX.interpolate({
|
||||
inputRange: [0, width, 2 * width],
|
||||
outputRange: [0, -200, -260]}),
|
||||
extrapolate: 'clamp'},
|
||||
{scale: this.state.scrollX.interpolate({
|
||||
inputRange: [0, width, 2 * width],
|
||||
outputRange: [0.5, 0.5, 2]}),
|
||||
extrapolate: 'clamp'},
|
||||
{
|
||||
translateX: this.state.scrollX.interpolate({
|
||||
inputRange: [0, width, 2 * width],
|
||||
outputRange: [0, 0, width / 3],
|
||||
extrapolate: 'clamp',
|
||||
}),
|
||||
},
|
||||
{
|
||||
translateY: this.state.scrollX.interpolate({
|
||||
inputRange: [0, width, 2 * width],
|
||||
outputRange: [0, -200, -260],
|
||||
extrapolate: 'clamp',
|
||||
}),
|
||||
},
|
||||
{
|
||||
scale: this.state.scrollX.interpolate({
|
||||
inputRange: [0, width, 2 * width],
|
||||
outputRange: [0.5, 0.5, 2],
|
||||
extrapolate: 'clamp',
|
||||
}),
|
||||
},
|
||||
]}]}
|
||||
source={BUNNY_PIC}
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue