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