X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fdirective%2FGoToTopDirective.ts;h=06a24626f40a3fdfdab67ff41ca97e74c2d2c8ff;hb=0a34dfa32165036b380ec6ac493469b34007df0a;hp=67cdc96c628d89fc0e30eb14a01a9de783193413;hpb=40cc37ef2bbc4aac5debc9dea0baeb6dbd87a2d7;p=osm%2FNG-UI.git diff --git a/src/directive/GoToTopDirective.ts b/src/directive/GoToTopDirective.ts index 67cdc96..06a2462 100644 --- a/src/directive/GoToTopDirective.ts +++ b/src/directive/GoToTopDirective.ts @@ -32,6 +32,7 @@ import { SharedService } from 'SharedService'; /** Exporting a class @exports GoToTopDirective */ export class GoToTopDirective { /** To set scroll top position @private */ + // eslint-disable-next-line @typescript-eslint/no-magic-numbers private topPosToStartShowing: number = 100; /** Contains all methods related to shared @private */ @@ -44,6 +45,7 @@ export class GoToTopDirective { * to listen the scroll event in DOM @public */ @HostListener('window:scroll') public enableGotoTop(): void { + // eslint-disable-next-line deprecation/deprecation const scrollPosition: number = Math.max(window.pageYOffset, document.documentElement.scrollTop, document.body.scrollTop); if (scrollPosition >= this.topPosToStartShowing) { this.sharedService.showGotoTop = true; @@ -51,5 +53,4 @@ export class GoToTopDirective { this.sharedService.showGotoTop = false; } } - }