fix(navDirection): use correct direction value

This commit is contained in:
Adam Bradley
2014-11-21 17:30:52 -06:00
parent 2683ffd075
commit 4ba4b44f47

View File

@@ -172,14 +172,14 @@ function($timeout, $document, $q, $ionicClickBlock, $ionicConfig, $ionicNavBarDe
// set the styles of where this element will end up going so
// the DOM has some time to render its correct starting point
transitionFn(enteringEle, null, registerData.direction, false).run(0);
transitionFn(enteringEle, null, enteringData.direction, false).run(0);
} else {
// the entering element is not already in the DOM
// set that the entering element should be "staged" and its
// styles of where this element will go before it hits the DOM
navViewAttr(enteringEle, VIEW_STATUS_STAGED);
transitionFn(enteringEle, null, registerData.direction, true).run(0);
transitionFn(enteringEle, null, enteringData.direction, true).run(0);
historyCursorAttr(enteringEle, registerData.isHistoryRoot ? HISTORY_ROOT : HISTORY_AFTER_ROOT);
@@ -223,7 +223,7 @@ function($timeout, $document, $q, $ionicClickBlock, $ionicConfig, $ionicNavBarDe
// 1) get the transition ready and see if it'll animate
var transitionFn = $ionicConfig.transitions.views[enteringData.transition];
var viewTransition = transitionFn(enteringEle, leavingEle, direction, enteringData.shouldAnimate);
var viewTransition = transitionFn(enteringEle, leavingEle, enteringData.direction, enteringData.shouldAnimate);
if (viewTransition.shouldAnimate) {
// 2) attach transitionend events (and fallback timer)