mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-10 04:25:08 +00:00
perfect scrollbar update on nav item toggle
+ iconset url fix
This commit is contained in:
parent
fcabc1fbff
commit
8cbc2f3ab7
|
@ -1,10 +1,12 @@
|
|||
import { Component, HostBinding, HostListener, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { Component, HostBinding, HostListener, Input, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { FuseMatchMedia } from '../../core/services/match-media.service';
|
||||
import { FuseNavbarService } from './navbar.service';
|
||||
import { ObservableMedia } from '@angular/flex-layout';
|
||||
import { FuseMainComponent } from '../main.component';
|
||||
import { NavigationEnd, Router } from '@angular/router';
|
||||
import { PerfectScrollbarDirective } from 'ngx-perfect-scrollbar';
|
||||
import { FuseNavigationService } from '../../core/components/navigation/navigation.service';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-navbar',
|
||||
|
@ -19,12 +21,14 @@ export class FuseNavbarComponent implements OnInit, OnDestroy
|
|||
@HostBinding('class.folded-open') isFoldedOpen: boolean;
|
||||
@HostBinding('class.initialized') initialized: boolean;
|
||||
@Input('folded') foldedByDefault = false;
|
||||
@ViewChild(PerfectScrollbarDirective) perfectScrollbarDirective;
|
||||
|
||||
matchMediaWatcher: Subscription;
|
||||
|
||||
constructor(
|
||||
private fuseMainComponentEl: FuseMainComponent,
|
||||
private fuseMatchMedia: FuseMatchMedia,
|
||||
private fuseNavigationService: FuseNavigationService,
|
||||
private navBarService: FuseNavbarService,
|
||||
public media: ObservableMedia,
|
||||
private router: Router
|
||||
|
@ -32,6 +36,13 @@ export class FuseNavbarComponent implements OnInit, OnDestroy
|
|||
{
|
||||
navBarService.setNavBar(this);
|
||||
|
||||
this.fuseNavigationService.onNavCollapseToggled.subscribe(() => {
|
||||
|
||||
setTimeout(() => {
|
||||
this.perfectScrollbarDirective.update();
|
||||
}, 310);
|
||||
});
|
||||
|
||||
this.matchMediaWatcher =
|
||||
this.fuseMatchMedia.onMediaChange
|
||||
.subscribe((mediaStep) => {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<link href="/assets/icons/meteocons/style.css" rel="stylesheet">
|
||||
<link href="assets/icons/meteocons/style.css" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
|
||||
|
||||
<!-- FUSE Splash Screen CSS -->
|
||||
|
|
Loading…
Reference in New Issue
Block a user