Permalink
Browse files

Add HorizontalSwipeJumpFromLeft animation to Navigator

Summary:
This brings RN Navigator to add HorizontalSwipeJumpFromLeft animation.
HorizontalSwipeJumpFromRight has been implemented but FromLeft version of SwipeJumpAnimation hasn't been there.
Closes #10406

Differential Revision: D4035212

fbshipit-source-id: edcbae18148e533b02a7d056de03154fb86280d0
  • Loading branch information...
1 parent 40e8d89 commit 2230117f360722ddbdb1bc8c87869bc98d392edb @yuya-fujimoto yuya-fujimoto committed with Facebook Github Bot Oct 18, 2016
@@ -307,6 +307,7 @@ var Navigator = React.createClass({
* - Navigator.SceneConfigs.FadeAndroid
* - Navigator.SceneConfigs.HorizontalSwipeJump
* - Navigator.SceneConfigs.HorizontalSwipeJumpFromRight
+ * - Navigator.SceneConfigs.HorizontalSwipeJumpFromLeft
* - Navigator.SceneConfigs.VerticalUpSwipeJump
* - Navigator.SceneConfigs.VerticalDownSwipeJump
*
@@ -698,6 +698,28 @@ var NavigatorSceneConfigs = {
out: buildStyleInterpolator(directionMapping.FadeToTheEnd),
},
},
+ HorizontalSwipeJumpFromLeft: {
+ ...BaseConfig,
+ gestures: {
+ jumpBack: {
+ ...directionMapping.BaseEndToStartGesture,
+ overswipe: BaseOverswipeConfig,
+ edgeHitWidth: null,
+ isDetachable: true,
+ },
+ jumpForward: {
+ ...directionMapping.BaseStartToEndGesture,
+ overswipe: BaseOverswipeConfig,
+ edgeHitWidth: null,
+ isDetachable: true,
+ },
+ pop: directionMapping.BaseEndToStartGesture,
+ },
+ animationInterpolators: {
+ into: buildStyleInterpolator(directionMapping.FromTheStart),
+ out: buildStyleInterpolator(directionMapping.ToTheEnd),
+ },
+ },
VerticalUpSwipeJump: {
...BaseConfig,
gestures: {

0 comments on commit 2230117

Please sign in to comment.