mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 08:20:13 +01:00
fix(chart): resize chart on sidebar expand/collapse (#1816)
This commit is contained in:
parent
f20c371c17
commit
aa8e7cdf27
16 changed files with 393 additions and 172 deletions
|
|
@ -3,6 +3,7 @@ import { Component, Input, OnInit } from '@angular/core';
|
|||
import { NbMenuService, NbSidebarService } from '@nebular/theme';
|
||||
import { UserService } from '../../../@core/data/users.service';
|
||||
import { AnalyticsService } from '../../../@core/utils/analytics.service';
|
||||
import { LayoutService } from '../../../@core/data/layout.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-header',
|
||||
|
|
@ -11,7 +12,6 @@ import { AnalyticsService } from '../../../@core/utils/analytics.service';
|
|||
})
|
||||
export class HeaderComponent implements OnInit {
|
||||
|
||||
|
||||
@Input() position = 'normal';
|
||||
|
||||
user: any;
|
||||
|
|
@ -21,7 +21,8 @@ export class HeaderComponent implements OnInit {
|
|||
constructor(private sidebarService: NbSidebarService,
|
||||
private menuService: NbMenuService,
|
||||
private userService: UserService,
|
||||
private analyticsService: AnalyticsService) {
|
||||
private analyticsService: AnalyticsService,
|
||||
private layoutService: LayoutService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
|
@ -31,11 +32,14 @@ export class HeaderComponent implements OnInit {
|
|||
|
||||
toggleSidebar(): boolean {
|
||||
this.sidebarService.toggle(true, 'menu-sidebar');
|
||||
this.layoutService.changeLayoutSize();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
toggleSettings(): boolean {
|
||||
this.sidebarService.toggle(false, 'settings-sidebar');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue