Skip to content

Commit

Permalink
fix(navbar): Don't fade out navbars. Fixes #8060
Browse files Browse the repository at this point in the history
  • Loading branch information
mlynch committed Oct 13, 2016
1 parent 2834cd8 commit eab5726
Showing 1 changed file with 8 additions and 29 deletions.
37 changes: 8 additions & 29 deletions src/transitions/transition-ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,9 @@ export class IOSTransition extends PageTransition {
// entering navbar, forward direction
enteringTitle.fromTo(TRANSLATEX, OFF_RIGHT, CENTER, true);

if (leavingHasNavbar) {
// entering navbar, forward direction, and there's a leaving navbar
// should just fade in, no sliding
enteringNavbarBg
.beforeClearStyles([TRANSLATEX])
.fromTo(OPACITY, 0.01, 1, true);

} else {
// entering navbar, forward direction, and there's no leaving navbar
// should just slide in, no fading in
enteringNavbarBg
.beforeClearStyles([OPACITY])
.fromTo(TRANSLATEX, OFF_RIGHT, CENTER, true);
}

enteringNavbarBg
.beforeClearStyles([OPACITY])
.fromTo(TRANSLATEX, OFF_RIGHT, CENTER, true);

if (enteringView.enableBack()) {
// forward direction, entering page has a back button
Expand Down Expand Up @@ -170,20 +158,11 @@ export class IOSTransition extends PageTransition {
// leaving navbar, back direction
leavingTitle.fromTo(TRANSLATEX, CENTER, '100%');

if (enteringHasNavbar) {
// leaving navbar, back direction, and there's an entering navbar
// should just fade out, no sliding
leavingNavbarBg
.beforeClearStyles([TRANSLATEX])
.fromTo(OPACITY, 0.99, 0);

} else {
// leaving navbar, back direction, and there's no entering navbar
// should just slide out, no fading out
leavingNavbarBg
.beforeClearStyles([OPACITY])
.fromTo(TRANSLATEX, CENTER, '100%');
}
// leaving navbar, back direction, and there's no entering navbar
// should just slide out, no fading out
leavingNavbarBg
.beforeClearStyles([OPACITY])
.fromTo(TRANSLATEX, CENTER, '100%');

let leavingBackBtnText = new Animation(leavingNavbarEle.querySelector('.back-button-text'));
leavingBackBtnText.fromTo(TRANSLATEX, CENTER, (300) + 'px');
Expand Down

0 comments on commit eab5726

Please sign in to comment.