Skip to content

Commit

Permalink
fix gratuitous app crash
Browse files Browse the repository at this point in the history
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 #12110

Differential Revision: D4480641

fbshipit-source-id: c9941e9cc2f0624c7120cfb17a3534c92207bf7a
  • Loading branch information
skv-headless authored and facebook-github-bot committed Jan 29, 2017
1 parent af5c21b commit 412acd2
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions Examples/UIExplorer/js/AnimatedGratuitousApp/AnExScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
Expand Down

0 comments on commit 412acd2

Please sign in to comment.