Fix set open for sidebar in app.component
This commit is contained in:
parent
b2bda20498
commit
7e06e34034
|
@ -94,16 +94,6 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@HostListener('window:resize', ['$event'])
|
|
||||||
onResize(event) {
|
|
||||||
if (this.layoutService.isSmallScreen && event.target.innerWidth > 640) {
|
|
||||||
this.layoutService.setSmallScreen(false);
|
|
||||||
} else if (!this.layoutService.isSmallScreen && event.target.innerWidth <= 640) {
|
|
||||||
this.layoutService.setSmallScreen(true);
|
|
||||||
this.layoutService.setOpen(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (typeof document !== 'undefined' && window) {
|
if (typeof document !== 'undefined' && window) {
|
||||||
this.innerWidth = window.innerWidth;
|
this.innerWidth = window.innerWidth;
|
||||||
|
@ -134,9 +124,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
this.setSideBar();
|
this.setSideBar();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.layoutService.setSmallScreen((this.innerWidth && this.innerWidth <= 640));
|
this.layoutService.setOpen(true);
|
||||||
this.layoutService.setOpen(!(this.innerWidth && this.innerWidth <= 640));
|
|
||||||
|
|
||||||
this.subscriptions.push(this.data.subscribe(data => {
|
this.subscriptions.push(this.data.subscribe(data => {
|
||||||
if (data && data.portal) {
|
if (data && data.portal) {
|
||||||
this.setProperties(data.portal);
|
this.setProperties(data.portal);
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 886b50a52c93163113ed6583faf8b054d9390731
|
Subproject commit 4c19e65edb3db3b546eda029ea90a58298a1f0ad
|
|
@ -1 +1 @@
|
||||||
Subproject commit 071385b36c9b9c65d6d081d6468aeea2bf01ffbf
|
Subproject commit 95c2b50a57696a80dd3dd376880f26cb21d65817
|
|
@ -1 +1 @@
|
||||||
Subproject commit ee657bbddcf3b56c00d93f38e91290900cb616bc
|
Subproject commit c4e2781acc42f281265a70d6cd75616cdd6fa762
|
Loading…
Reference in New Issue