[master]: Fix getmaxwidth for server side.
This commit is contained in:
parent
cd80fda84f
commit
cd4a5faf38
|
@ -124,7 +124,6 @@ export class AppComponent extends ResearcherBaseComponent implements OnInit, Aft
|
|||
protected _searchResearchResultsService: SearchResearchResultsService
|
||||
) {
|
||||
super();
|
||||
this.getWindowWidth();
|
||||
// this.configurationService.initStaticPortal(this.irish.portal);
|
||||
// this.configurationService.initPortal(this.properties, this.properties.adminToolsCommunity);
|
||||
this.setProperties(this.properties.adminToolsCommunity, this.properties.adminToolsPortalType);
|
||||
|
@ -135,6 +134,7 @@ export class AppComponent extends ResearcherBaseComponent implements OnInit, Aft
|
|||
@HostListener('window:resize', ['$event'])
|
||||
onResize(event) {
|
||||
this.getWindowWidth();
|
||||
this.buildMenuItems();
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
@ -147,6 +147,9 @@ export class AppComponent extends ResearcherBaseComponent implements OnInit, Aft
|
|||
|
||||
ngOnInit() {
|
||||
this.isClient = typeof document !== 'undefined';
|
||||
if(this.isClient) {
|
||||
this.getWindowWidth();
|
||||
}
|
||||
if (this.properties.environment == 'beta') {
|
||||
this.header.environmentBadge = {
|
||||
asset: 'assets/badge/sandbox.svg'
|
||||
|
@ -307,6 +310,5 @@ export class AppComponent extends ResearcherBaseComponent implements OnInit, Aft
|
|||
} else {
|
||||
this.compactMenuItems = false;
|
||||
}
|
||||
this.buildMenuItems();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue