fix(view): prevent flicker

This commit is contained in:
Adam Bradley
2014-11-26 10:11:21 -06:00
parent 070724c522
commit 5966c675f5
2 changed files with 3 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ function($document, $ionicBody, $timeout) {
cb.classList.remove(CSS_HIDE);
} else {
$ionicBody.append(cb);
isAttached = true;
}
});

View File

@@ -231,8 +231,7 @@ function($timeout, $document, $q, $ionicClickBlock, $ionicConfig, $ionicNavBarDe
if (viewTransition.shouldAnimate) {
// 2) attach transitionend events (and fallback timer)
enteringEle.on(TRANSITIONEND_EVENT, transitionComplete);
leavingEle && leavingEle.on(TRANSITIONEND_EVENT, transitionComplete);
enteringEle.data(DATA_FALLBACK_TIMER, $timeout(transitionComplete, 750));
enteringEle.data(DATA_FALLBACK_TIMER, $timeout(transitionComplete, 1000));
}
// 3) stage entering element, opacity 0, no transition duration
@@ -271,8 +270,8 @@ function($timeout, $document, $q, $ionicClickBlock, $ionicConfig, $ionicNavBarDe
transitionComplete.x = true;
enteringEle.off(TRANSITIONEND_EVENT, transitionComplete);
leavingEle && leavingEle.off(TRANSITIONEND_EVENT, transitionComplete);
$timeout.cancel(enteringEle.data(DATA_FALLBACK_TIMER));
leavingEle && $timeout.cancel(leavingEle.data(DATA_FALLBACK_TIMER));
// 8) emit that the views have finished transitioning
// each parent nav-view will update which views are active and cached