slate-angular 20.2.0-next.21 → 20.2.0-next.22
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.
|
@@ -3580,6 +3580,7 @@ class SlateEditable {
|
|
|
3580
3580
|
this.editorResizeObserver = new ResizeObserver(entries => {
|
|
3581
3581
|
if (entries.length > 0 && entries[0].contentRect.width !== editorResizeObserverRectWidth) {
|
|
3582
3582
|
editorResizeObserverRectWidth = entries[0].contentRect.width;
|
|
3583
|
+
this.keyHeightMap.clear();
|
|
3583
3584
|
const remeasureIndics = Array.from(this.inViewportIndics);
|
|
3584
3585
|
this.remeasureHeightByIndics(remeasureIndics);
|
|
3585
3586
|
}
|
|
@@ -3699,7 +3700,7 @@ class SlateEditable {
|
|
|
3699
3700
|
const totalHeight = accumulatedHeights[elementLength];
|
|
3700
3701
|
const maxScrollTop = Math.max(0, totalHeight - viewportHeight);
|
|
3701
3702
|
const limitedScrollTop = Math.min(adjustedScrollTop, maxScrollTop);
|
|
3702
|
-
const viewBottom = limitedScrollTop + viewportHeight
|
|
3703
|
+
const viewBottom = limitedScrollTop + viewportHeight;
|
|
3703
3704
|
let accumulatedOffset = 0;
|
|
3704
3705
|
let visibleStartIndex = -1;
|
|
3705
3706
|
const visible = [];
|
|
@@ -5029,6 +5030,9 @@ class BaseLeafComponent extends BaseComponent {
|
|
|
5029
5030
|
super(...arguments);
|
|
5030
5031
|
this.stringRender = null;
|
|
5031
5032
|
this.isSlateLeaf = true;
|
|
5033
|
+
this.getOutletParent = () => {
|
|
5034
|
+
return this.elementRef.nativeElement;
|
|
5035
|
+
};
|
|
5032
5036
|
}
|
|
5033
5037
|
get text() {
|
|
5034
5038
|
return this.context && this.context.text;
|
|
@@ -5043,7 +5047,7 @@ class BaseLeafComponent extends BaseComponent {
|
|
|
5043
5047
|
if (!this.initialized) {
|
|
5044
5048
|
this.stringRender = new SlateStringRender(this.context, this.viewContext);
|
|
5045
5049
|
const stringNode = this.stringRender.render();
|
|
5046
|
-
this.
|
|
5050
|
+
this.getOutletParent().appendChild(stringNode);
|
|
5047
5051
|
}
|
|
5048
5052
|
else {
|
|
5049
5053
|
this.stringRender?.update(this.context, this.viewContext);
|