Add a new Navigator SceneConfig swipeFromLeft
Summary: Add a new `SwipeFromLeft` Navigator SceneConfig. The animation is the opposite of `HorizontalSwipeJump`, however there's no `Jump` while animating as `HorizontalSwipeJump`. Should `HorizontalSwipeJump` be renamed to `SwipeFromRight`? ![swipe-left-anim-2](https://cloud.githubusercontent.com/assets/8182981/18466947/8ca4dd24-79bb-11e6-8cae-8ffa34c0c7da.gif) Closes https://github.com/facebook/react-native/pull/9877 Differential Revision: D4160059 Pulled By: hramos fbshipit-source-id: 7426ec72adea80af2d5612aae1dd9d2e6dc090f3
This commit is contained in:
parent
08950700fe
commit
1888a0af16
|
@ -314,6 +314,7 @@ var Navigator = React.createClass({
|
||||||
* - Navigator.SceneConfigs.FloatFromBottom
|
* - Navigator.SceneConfigs.FloatFromBottom
|
||||||
* - Navigator.SceneConfigs.FloatFromBottomAndroid
|
* - Navigator.SceneConfigs.FloatFromBottomAndroid
|
||||||
* - Navigator.SceneConfigs.FadeAndroid
|
* - Navigator.SceneConfigs.FadeAndroid
|
||||||
|
* - Navigator.SceneConfigs.SwipeFromLeft
|
||||||
* - Navigator.SceneConfigs.HorizontalSwipeJump
|
* - Navigator.SceneConfigs.HorizontalSwipeJump
|
||||||
* - Navigator.SceneConfigs.HorizontalSwipeJumpFromRight
|
* - Navigator.SceneConfigs.HorizontalSwipeJumpFromRight
|
||||||
* - Navigator.SceneConfigs.HorizontalSwipeJumpFromLeft
|
* - Navigator.SceneConfigs.HorizontalSwipeJumpFromLeft
|
||||||
|
|
|
@ -655,6 +655,27 @@ var NavigatorSceneConfigs = {
|
||||||
out: buildStyleInterpolator(FadeOut),
|
out: buildStyleInterpolator(FadeOut),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
SwipeFromLeft: {
|
||||||
|
...BaseConfig,
|
||||||
|
gestures: {
|
||||||
|
jumpBack: {
|
||||||
|
...directionMapping.BaseEndToStartGesture,
|
||||||
|
overswipe: BaseOverswipeConfig,
|
||||||
|
edgeHitWidth: null,
|
||||||
|
isDetachable: true,
|
||||||
|
},
|
||||||
|
jumpForward: {
|
||||||
|
...directionMapping.BaseStartToEndGesture,
|
||||||
|
overswipe: BaseOverswipeConfig,
|
||||||
|
edgeHitWidth: null,
|
||||||
|
isDetachable: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
animationInterpolators: {
|
||||||
|
into: buildStyleInterpolator(directionMapping.FromTheStart),
|
||||||
|
out: buildStyleInterpolator(directionMapping.ToTheEnd),
|
||||||
|
},
|
||||||
|
},
|
||||||
HorizontalSwipeJump: {
|
HorizontalSwipeJump: {
|
||||||
...BaseConfig,
|
...BaseConfig,
|
||||||
gestures: {
|
gestures: {
|
||||||
|
|
Loading…
Reference in New Issue