@worktile/theia 20.2.10 → 20.2.11
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.
|
@@ -18436,9 +18436,7 @@ class TheEditorComponent {
|
|
|
18436
18436
|
this.elementToHtml = new WeakMap();
|
|
18437
18437
|
this.virtualScrollConfig = signal({
|
|
18438
18438
|
enabled: false,
|
|
18439
|
-
scrollTop: 0
|
|
18440
|
-
viewportHeight: 0,
|
|
18441
|
-
viewportBoundingTop: 0
|
|
18439
|
+
scrollTop: 0
|
|
18442
18440
|
}, ...(ngDevMode ? [{ debugName: "virtualScrollConfig" }] : []));
|
|
18443
18441
|
this.onChangeCallback = () => { };
|
|
18444
18442
|
this.onTouchedCallback = () => { };
|
|
@@ -18527,6 +18525,7 @@ class TheEditorComponent {
|
|
|
18527
18525
|
}
|
|
18528
18526
|
ngOnInit() {
|
|
18529
18527
|
this.initialize();
|
|
18528
|
+
this.updateVirtualConfig();
|
|
18530
18529
|
this.onErrorHandler();
|
|
18531
18530
|
initializeDefaultMenuIcons(this.iconRegistry);
|
|
18532
18531
|
}
|
|
@@ -18567,26 +18566,20 @@ class TheEditorComponent {
|
|
|
18567
18566
|
.subscribe(() => {
|
|
18568
18567
|
this.updateVirtualConfig();
|
|
18569
18568
|
});
|
|
18570
|
-
this.updateVirtualConfig();
|
|
18571
18569
|
}
|
|
18572
18570
|
updateVirtualConfig() {
|
|
18573
18571
|
const scrollContainer = this.theContextService.getScrollContainer();
|
|
18574
18572
|
if (!this.virtualScrollConfig().enabled || !scrollContainer) {
|
|
18575
18573
|
return;
|
|
18576
18574
|
}
|
|
18577
|
-
const { scrollTop
|
|
18578
|
-
if (this.scrollContainerBoundingTop === null) {
|
|
18579
|
-
this.scrollContainerBoundingTop = scrollContainer.getBoundingClientRect().top;
|
|
18580
|
-
}
|
|
18575
|
+
const { scrollTop } = scrollContainer;
|
|
18581
18576
|
if (localStorage.getItem(SLATE_DEBUG_KEY + '__SCROLL_TOP')) {
|
|
18582
18577
|
console.log(`theia: scroll event fired from user: ${scrollTop}`);
|
|
18583
18578
|
}
|
|
18584
18579
|
this.virtualScrollConfig.update(config => ({
|
|
18585
18580
|
...config,
|
|
18586
18581
|
scrollTop,
|
|
18587
|
-
|
|
18588
|
-
scrollContainer: this.theContextService.getScrollContainer(),
|
|
18589
|
-
viewportBoundingTop: this.scrollContainerBoundingTop
|
|
18582
|
+
scrollContainer
|
|
18590
18583
|
}));
|
|
18591
18584
|
}
|
|
18592
18585
|
initialize() {
|