@worktile/theia 20.1.0-next.3 → 20.1.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18340,7 +18340,6 @@ class TheEditorComponent {
|
|
|
18340
18340
|
}
|
|
18341
18341
|
}
|
|
18342
18342
|
ngOnDestroy() {
|
|
18343
|
-
this.scrollContainerResizeObserver?.disconnect();
|
|
18344
18343
|
THE_EDITOR_PREVIOUS_SELECTION.delete(this.editor);
|
|
18345
18344
|
}
|
|
18346
18345
|
bindVirtualScrollContainer() {
|
|
@@ -18349,10 +18348,6 @@ class TheEditorComponent {
|
|
|
18349
18348
|
return;
|
|
18350
18349
|
}
|
|
18351
18350
|
this.scrollContainerElement = scrollContainer;
|
|
18352
|
-
this.scrollContainerResizeObserver = new ResizeObserver(() => {
|
|
18353
|
-
this.syncVirtualConfig();
|
|
18354
|
-
});
|
|
18355
|
-
this.scrollContainerResizeObserver.observe(scrollContainer);
|
|
18356
18351
|
this.ngZone.runOutsideAngular(() => {
|
|
18357
18352
|
fromEvent(scrollContainer, 'scroll')
|
|
18358
18353
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
@@ -18367,21 +18362,21 @@ class TheEditorComponent {
|
|
|
18367
18362
|
JUST_NOW_UPDATED_VIRTUAL_VIEW.set(this.editor, false);
|
|
18368
18363
|
}
|
|
18369
18364
|
});
|
|
18365
|
+
this.syncVirtualConfig();
|
|
18370
18366
|
});
|
|
18371
|
-
this.syncVirtualConfig();
|
|
18372
18367
|
}
|
|
18373
18368
|
syncVirtualConfig() {
|
|
18374
18369
|
if (!this.virtualConfig().enabled || !this.scrollContainerElement) {
|
|
18375
18370
|
return;
|
|
18376
18371
|
}
|
|
18377
|
-
const { scrollTop,
|
|
18372
|
+
const { scrollTop, offsetHeight } = this.scrollContainerElement;
|
|
18378
18373
|
if (localStorage.getItem(SLATE_DEBUG_KEY + '__SCROLL_TOP')) {
|
|
18379
18374
|
console.log(`theia: scroll event fired from user: ${scrollTop}`);
|
|
18380
18375
|
}
|
|
18381
18376
|
this.virtualConfig.update(config => ({
|
|
18382
18377
|
...config,
|
|
18383
18378
|
scrollTop,
|
|
18384
|
-
viewportHeight:
|
|
18379
|
+
viewportHeight: offsetHeight
|
|
18385
18380
|
}));
|
|
18386
18381
|
}
|
|
18387
18382
|
initialize() {
|