diff --git a/dashboard/sharedComponents/page-content/page-content.component.ts b/dashboard/sharedComponents/page-content/page-content.component.ts index df7428e4..54261153 100644 --- a/dashboard/sharedComponents/page-content/page-content.component.ts +++ b/dashboard/sharedComponents/page-content/page-content.component.ts @@ -98,23 +98,25 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy { ngAfterViewInit() { if (typeof document !== "undefined") { - if (this.shouldSticky && typeof document !== 'undefined') { - this.initHeader(); - this.observeStickyHeader(); - this.subscriptions.push(UIkit.util.on(document, 'active', '#' + this.sticky.header.$el.id, () => { - this.isStickyActive = true; - this.cdr.detectChanges(); - })); - this.subscriptions.push(UIkit.util.on(document, 'inactive', '#' + this.sticky.header.$el.id, () => { - this.isStickyActive = false; - this.cdr.detectChanges(); - })); - } if (this.sticky_footer) { - let footer_offset = this.calcStickyFooterOffset(this.sticky_footer.nativeElement); - this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {bottom: true, offset: footer_offset}); + this.initFooter(); this.observeStickyFooter(); } + if (this.shouldSticky && typeof document !== 'undefined') { + setTimeout(() => { + this.sticky.header = UIkit.sticky((this.headerSticky ? this.header.nativeElement : this.actions.nativeElement), { + offset: this.offset + }); + this.subscriptions.push(UIkit.util.on(document, 'active', '#' + this.sticky.header.$el.id, () => { + this.isStickyActive = true; + this.cdr.detectChanges(); + })); + this.subscriptions.push(UIkit.util.on(document, 'inactive', '#' + this.sticky.header.$el.id, () => { + this.isStickyActive = false; + this.cdr.detectChanges(); + })); + }); + } } } @@ -127,13 +129,6 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy { } }); } - - initHeader() { - this.sticky.header = UIkit.sticky((this.headerSticky ? this.header.nativeElement : this.actions.nativeElement), { - offset: this.offset - }); - - } initFooter() { let footer_offset = this.calcStickyFooterOffset(this.sticky_footer.nativeElement); @@ -209,18 +204,6 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy { headerObs.observe(this.header.nativeElement); } } - - private observeStickyHeader() { - if (this.sticky.header) { - let resizeObs= new ResizeObserver(entries => { - entries.forEach(entry => { - this.initHeader(); - }) - }); - this.subscriptions.push(resizeObs); - resizeObs.observe(this.sticky.header.$el); - } - } private observeStickyFooter() { if (this.sticky_footer) { diff --git a/dashboard/sharedComponents/sidebar/sideBar.component.ts b/dashboard/sharedComponents/sidebar/sideBar.component.ts index 2e0c8aa1..39bc1fc1 100644 --- a/dashboard/sharedComponents/sidebar/sideBar.component.ts +++ b/dashboard/sharedComponents/sidebar/sideBar.component.ts @@ -49,7 +49,9 @@ export class SideBarComponent implements OnInit, AfterViewInit, OnDestroy, OnCha } ngAfterViewInit() { - this.toggle(true); + setTimeout(() => { + this.toggle(true); + }); } ngOnChanges(changes: SimpleChanges) { diff --git a/monitor/methodology/terminology.component.less b/monitor/methodology/terminology.component.less new file mode 100644 index 00000000..e6212b69 --- /dev/null +++ b/monitor/methodology/terminology.component.less @@ -0,0 +1,3 @@ +.uk-width-medium { + width: 350px; +} diff --git a/monitor/methodology/terminology.component.ts b/monitor/methodology/terminology.component.ts index ded7fbcd..2e518e29 100644 --- a/monitor/methodology/terminology.component.ts +++ b/monitor/methodology/terminology.component.ts @@ -50,7 +50,7 @@ declare var ResizeObserver;
-
+
@@ -116,7 +116,8 @@ declare var ResizeObserver;
- ` + `, + styleUrls: ['terminology.component.less'] }) export class TerminologyComponent implements OnInit, OnDestroy, AfterViewInit, AfterContentChecked { public tab: 'entities' | 'attributes' = 'entities';