Skip to content

Commit

Permalink
Add HorizontalSwipeJumpFromLeft animation to Navigator
Browse files Browse the repository at this point in the history
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
yuya-fujimoto authored and Facebook Github Bot committed Oct 18, 2016
1 parent 40e8d89 commit 2230117
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions Libraries/CustomComponents/Navigator/Navigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
22 changes: 22 additions & 0 deletions Libraries/CustomComponents/Navigator/NavigatorSceneConfigs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 2230117

Please sign in to comment.