Update StackViewCard.js

This commit is contained in:
Brent Vatne 2018-09-14 12:30:11 +02:00 committed by GitHub
parent 614bcfaee3
commit 358ddcfb41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,9 +32,11 @@ class Card extends React.Component {
scene: { index, isActive }, scene: { index, isActive },
} = this.props; } = this.props;
const active = position.interpolate({ const active = isActive
? 1
: position.interpolate({
inputRange: [index, index + 1 - EPS, index + 1], inputRange: [index, index + 1 - EPS, index + 1],
outputRange: [1, 1, isActive ? 1 : 0], outputRange: [1, 1, 0],
extrapolate: 'clamp', extrapolate: 'clamp',
}); });