Update language Editor (still not functional)

This commit is contained in:
George Kalampokis 2020-07-10 18:41:20 +03:00
parent aa930f097a
commit 8eb054f9d2
1 changed files with 101 additions and 102 deletions

View File

@ -108,9 +108,8 @@ onCallbackError(error: any) {
}
refreshFn = (ev: Event) => {
if ((ev.srcElement as HTMLDocument).scrollingElement !== undefined) {
this.startIndex = Math.floor((ev.srcElement as HTMLDocument).scrollingElement.scrollTop / this.rowHeight);
if (document.scrollingElement !== undefined) {
this.startIndex = Math.floor(document.scrollingElement.scrollTop / this.rowHeight);
this.endIndex = this.startIndex + this.maxElements;
const tempKeys = this.keys.slice(this.startIndex, this.endIndex);
this.visibleKeys.length = 0;