Merge pull request #110 from expo/master

Removed animation on web.
This commit is contained in:
Brent Vatne
2019-04-23 13:43:35 -07:00
parent 6535aee2fd
commit 22bfd4f314
2 changed files with 14 additions and 9 deletions

View File

@@ -32,14 +32,17 @@ class Card extends React.Component {
scene: { index, isActive },
} = this.props;
const active =
transparent || isActive
? 1
: position.interpolate({
inputRange: [index, index + 1 - EPS, index + 1],
outputRange: [1, 1, 0],
extrapolate: 'clamp',
});
const active = Platform.select({
web: isActive,
default:
transparent || isActive
? 1
: position.interpolate({
inputRange: [index, index + 1 - EPS, index + 1],
outputRange: [1, 1, 0],
extrapolate: 'clamp',
}),
});
// animatedStyle can be `false` if there is no screen interpolator
const animatedStyle = this.props.animatedStyle || {};

View File

@@ -666,9 +666,11 @@ class StackViewLayout extends React.Component {
if (this.props.headerMode) {
return this.props.headerMode;
}
if (Platform.OS !== 'ios' || this.props.mode === 'modal') {
if (Platform.OS === 'android' || this.props.mode === 'modal') {
return 'screen';
}
// On web, the float header mode will enable body scrolling and stick the header
// to the top of the URL bar when it shrinks and expands.
return 'float';
}