Skip to content

Commit

Permalink
Remove gmf-mobile-nav-slide class
Browse files Browse the repository at this point in the history
  • Loading branch information
julsbreakdown committed Sep 17, 2018
1 parent c16bd60 commit 794c3c1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
11 changes: 0 additions & 11 deletions contribs/gmf/src/controllers/mobile-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@ nav.gmf-mobile-nav-right {
transform: translateX(-100%);
opacity: 1;
}
&.gmf-mobile-nav-slide-out {
transform: translateX(-120%);
opacity: 0;
}
}

&.gmf-mobile-nav-back {
Expand All @@ -162,9 +158,6 @@ nav.gmf-mobile-nav-right {
> nav.gmf-mobile-nav-active {
transform: translateX(-100%);
}
> nav.gmf-mobile-nav-slide-out {
transform: translateX(0);
}
}
}

Expand Down Expand Up @@ -223,10 +216,6 @@ nav.gmf-mobile-nav-right {
transform: translateX(0%);
opacity: 1;
}
&.gmf-mobile-nav-slide-out {
transform: translateX(-20%);
opacity: 0;
}
}
}

Expand Down
13 changes: 1 addition & 12 deletions contribs/gmf/src/mobile/navigation/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ exports.Controller_.prototype.init = function(element) {
// push the item to the selected stack
this.slid_.push(slideOut);

// slide the "old" element out
slideOut.addClass(cls.SLIDE_OUT).removeClass(cls.ACTIVE);

// element to slide in
const slideIn = $($(evt.currentTarget).attr('data-target'));
googAsserts.assert(slideIn.length === 1);
Expand Down Expand Up @@ -169,10 +166,6 @@ exports.Controller_.prototype.updateNavigationHeader_ = function(
// remove any inactive nav
this.header_.find(`nav:not(.${cls.ACTIVE} +)`).remove();

// deactivate the currently active nav
this.header_.find(`nav.${cls.ACTIVE}`).removeClass(cls.ACTIVE)
.addClass(cls.SLIDE_OUT);

// show the back button when relevant
this.backButton_.toggleClass(cls.ACTIVE, this.slid_.length > 0);

Expand Down Expand Up @@ -221,9 +214,6 @@ exports.Controller_.prototype.back_ = function() {
// get the previously active item
const slideBack = this.slid_.pop();

// slide previous item to the right
slideBack.addClass(cls.ACTIVE).removeClass(cls.SLIDE_OUT);

// update the navigation header
this.updateNavigationHeader_(slideBack, true);

Expand Down Expand Up @@ -253,8 +243,7 @@ exports.Controller_.ClassName_ = {
ACTIVE: 'gmf-mobile-nav-active',
BACK: 'gmf-mobile-nav-back',
GO_BACK: 'gmf-mobile-nav-go-back',
SLIDE: 'gmf-mobile-nav-slide',
SLIDE_OUT: 'gmf-mobile-nav-slide-out'
SLIDE: 'gmf-mobile-nav-slide'
};


Expand Down

0 comments on commit 794c3c1

Please sign in to comment.