Fixes #33: Toolbar navigation bar button should toggle the navigation bar

This commit is contained in:
Sercan Yemen 2017-10-31 10:06:49 +03:00
parent ee29f20304
commit 1934bad3eb
2 changed files with 11 additions and 1 deletions

View File

@ -145,6 +145,11 @@ export class FuseNavbarVerticalComponent implements OnInit, OnDestroy
openBar() openBar()
{ {
if ( !this.isClosed )
{
return;
}
this.isClosed = false; this.isClosed = false;
this.updateCssClasses(); this.updateCssClasses();
if ( this.media.isActive('lt-lg') ) if ( this.media.isActive('lt-lg') )
@ -155,6 +160,11 @@ export class FuseNavbarVerticalComponent implements OnInit, OnDestroy
closeBar() closeBar()
{ {
if ( this.isClosed )
{
return;
}
this.isClosed = true; this.isClosed = true;
this.updateCssClasses(); this.updateCssClasses();
this._detachBackdrop(); this._detachBackdrop();

View File

@ -7,7 +7,7 @@
<div fxFlex="1 0 auto" fxLayout="row" fxLayoutAlign="start center"> <div fxFlex="1 0 auto" fxLayout="row" fxLayoutAlign="start center">
<button mat-button class="toggle-button-navbar mat-icon-button" <button mat-button class="toggle-button-navbar mat-icon-button"
fuseNavbarVertical="openBar" fxHide.gt-md> fuseNavbarVertical="toggleBar" fxHide.gt-md>
<mat-icon>menu</mat-icon> <mat-icon>menu</mat-icon>
</button> </button>