Bump shadow radius, fix velocity thresholds on release, speed up goBack spring
This commit is contained in:
parent
089173f50c
commit
f334c7645a
|
@ -62,7 +62,7 @@ const styles = StyleSheet.create({
|
|||
backgroundColor: '#E9E9EF',
|
||||
shadowColor: '#000',
|
||||
shadowOffset: { width: -4, height: 0 },
|
||||
shadowRadius: 5,
|
||||
shadowRadius: 6,
|
||||
},
|
||||
transparent: {
|
||||
...StyleSheet.absoluteFillObject,
|
||||
|
|
|
@ -223,7 +223,7 @@ class StackViewLayout extends React.Component {
|
|||
if (Platform.OS === 'ios' && supportsImprovedSpringAnimation()) {
|
||||
Animated.spring(position, {
|
||||
toValue,
|
||||
stiffness: 5000,
|
||||
stiffness: 8000,
|
||||
damping: 600,
|
||||
mass: 3,
|
||||
useNativeDriver: USE_NATIVE_DRIVER,
|
||||
|
@ -500,12 +500,12 @@ class StackViewLayout extends React.Component {
|
|||
this.setState({ gesturePosition: null }, () => {
|
||||
// If the speed of the gesture release is significant, use that as the indication
|
||||
// of intent
|
||||
if (gestureVelocity < -0.5) {
|
||||
if (gestureVelocity < -50) {
|
||||
this.props.onGestureCanceled && this.props.onGestureCanceled();
|
||||
this._reset(immediateIndex, resetDuration);
|
||||
return;
|
||||
}
|
||||
if (gestureVelocity > 0.5) {
|
||||
if (gestureVelocity > 50) {
|
||||
this.props.onGestureFinish && this.props.onGestureFinish();
|
||||
this._goBack(immediateIndex, goBackDuration);
|
||||
return;
|
||||
|
@ -546,12 +546,12 @@ class StackViewLayout extends React.Component {
|
|||
this.setState({ gesturePosition: null }, () => {
|
||||
// If the speed of the gesture release is significant, use that as the indication
|
||||
// of intent
|
||||
if (gestureVelocity < -0.5) {
|
||||
if (gestureVelocity < -50) {
|
||||
this.props.onGestureCanceled && this.props.onGestureCanceled();
|
||||
this._reset(immediateIndex, resetDuration);
|
||||
return;
|
||||
}
|
||||
if (gestureVelocity > 0.5) {
|
||||
if (gestureVelocity > 50) {
|
||||
this.props.onGestureFinish && this.props.onGestureFinish();
|
||||
this._goBack(immediateIndex, goBackDuration);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue