diff --git a/src/app/core/directives/md-sidenav-helper/md-sidenav-helper.directive.ts b/src/app/core/directives/md-sidenav-helper/md-sidenav-helper.directive.ts index ca6fa6af..f0ad7ab4 100644 --- a/src/app/core/directives/md-sidenav-helper/md-sidenav-helper.directive.ts +++ b/src/app/core/directives/md-sidenav-helper/md-sidenav-helper.directive.ts @@ -1,4 +1,4 @@ -import { Directive, Input, OnInit, HostListener, OnDestroy, HostBinding, AfterViewInit } from '@angular/core'; +import { Directive, Input, OnInit, HostListener, OnDestroy, HostBinding } from '@angular/core'; import { MdSidenav } from '@angular/material'; import { FuseMdSidenavHelperService } from 'app/core/directives/md-sidenav-helper/md-sidenav-helper.service'; import { FuseMatchMedia } from '../../services/match-media.service'; @@ -8,7 +8,7 @@ import { Subscription } from 'rxjs/Subscription'; @Directive({ selector: '[fuseMdSidenavHelper]' }) -export class FuseMdSidenavHelperDirective implements OnInit, AfterViewInit, OnDestroy +export class FuseMdSidenavHelperDirective implements OnInit, OnDestroy { matchMediaSubscription: Subscription; @@ -38,6 +38,7 @@ export class FuseMdSidenavHelperDirective implements OnInit, AfterViewInit, OnDe this.mdSidenav.mode = 'side'; this.mdSidenav.open(); }); + this.stopTransition = false; } else { @@ -46,6 +47,10 @@ export class FuseMdSidenavHelperDirective implements OnInit, AfterViewInit, OnDe this.mdSidenav.mode = 'over'; this.mdSidenav.close(); }); + + setTimeout(() => { + this.stopTransition = false; + }, 3000); } this.matchMediaSubscription = this.fuseMatchMedia.onMediaChange.subscribe(() => { @@ -69,13 +74,6 @@ export class FuseMdSidenavHelperDirective implements OnInit, AfterViewInit, OnDe } - ngAfterViewInit() - { - setTimeout(() => { - this.stopTransition = false; - }, 300); - } - ngOnDestroy() { this.matchMediaSubscription.unsubscribe(); diff --git a/src/app/core/scss/partials/_angular-material-fix.scss b/src/app/core/scss/partials/_angular-material-fix.scss index 437fe6ac..5a4cb7df 100644 --- a/src/app/core/scss/partials/_angular-material-fix.scss +++ b/src/app/core/scss/partials/_angular-material-fix.scss @@ -9,9 +9,10 @@ md-sidenav-container { md-sidenav { - &.md-stop-transition { + &[md-is-locked-open].md-stop-transition { transition: none !important; transform: translate3d(0, 0, 0) !important; + opacity: 0; ~ .mat-sidenav-content, ~ .mat-drawer-content { diff --git a/src/app/main/content/apps/calendar/calendar.component.html b/src/app/main/content/apps/calendar/calendar.component.html index 6f7969e7..0e04352d 100644 --- a/src/app/main/content/apps/calendar/calendar.component.html +++ b/src/app/main/content/apps/calendar/calendar.component.html @@ -1,6 +1,7 @@