Rename scroll handler

This commit is contained in:
everoddandeven 2024-12-29 19:01:25 +01:00
parent 406d4df14a
commit 3ca5926f59

View file

@ -32,7 +32,7 @@ export class LogsComponent extends BasePageComponent implements AfterViewInit, O
public scrolling: boolean = false; public scrolling: boolean = false;
private readonly mScrollHandler: (ev: Event) => void = (ev: Event) => { private readonly scrollHandler: (ev: Event) => void = (ev: Event) => {
this.scrolling = ev.type === 'scroll'; this.scrolling = ev.type === 'scroll';
}; };
@ -85,8 +85,8 @@ export class LogsComponent extends BasePageComponent implements AfterViewInit, O
return; return;
} }
tab.addEventListener('scroll', this.mScrollHandler); tab.addEventListener('scroll', this.scrollHandler);
tab.addEventListener('scrollend', this.mScrollHandler); tab.addEventListener('scrollend', this.scrollHandler);
} }
private unregisterScrollEvents(): void { private unregisterScrollEvents(): void {
@ -102,8 +102,8 @@ export class LogsComponent extends BasePageComponent implements AfterViewInit, O
return; return;
} }
tab.removeEventListener('scroll', this.mScrollHandler); tab.removeEventListener('scroll', this.scrollHandler);
tab.removeEventListener('scrollend', this.mScrollHandler); tab.removeEventListener('scrollend', this.scrollHandler);
} }
public trackByFn(index: number, item: string): number { public trackByFn(index: number, item: string): number {