diff --git a/dashboard/sharedComponents/page-content/page-content.component.ts b/dashboard/sharedComponents/page-content/page-content.component.ts index 7b9ce16e..2803fd79 100644 --- a/dashboard/sharedComponents/page-content/page-content.component.ts +++ b/dashboard/sharedComponents/page-content/page-content.component.ts @@ -15,31 +15,10 @@ import {ChangeDetectorRef, Component, HostListener, OnDestroy, OnInit} from "@an ` }) -export class PageContentComponent implements OnInit, OnDestroy{ - private current; +export class PageContentComponent implements OnInit{ public offset: string; - constructor(private cdr: ChangeDetectorRef) { - } - - @HostListener('window:scroll', ['$event.target']) // for window scroll events - scroll(e) { - let scroll = e.scrollingElement.scrollTop; - if (scroll > this.current) { - this.offset = '0'; - } else { - this.offset = getComputedStyle(document.documentElement).getPropertyValue('--structure-header-height'); - } - this.current = scroll; - this.cdr.detectChanges(); - } - ngOnInit() { - if(typeof window !== "undefined") { - this.current = window.pageYOffset; - } - } - - ngOnDestroy() { + this.offset = getComputedStyle(document.documentElement).getPropertyValue('--structure-header-height'); } } diff --git a/sharedComponents/navigationBar.component.html b/sharedComponents/navigationBar.component.html index 5da75016..b4f0da3f 100644 --- a/sharedComponents/navigationBar.component.html +++ b/sharedComponents/navigationBar.component.html @@ -266,7 +266,7 @@ + class="uk-width-1-1">

{{header.title}}

@@ -278,7 +278,7 @@ + class="uk-width-1-1">

{{header.title}}