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