slate-angular 20.2.0-next.33 → 20.2.0-next.35
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.
|
@@ -2941,9 +2941,20 @@ class ListRender {
|
|
|
2941
2941
|
if (this.preRenderingHTMLElement.length > 0) {
|
|
2942
2942
|
const preRenderingElement = [...this.preRenderingHTMLElement];
|
|
2943
2943
|
preRenderingElement.forEach((rootNodes, index) => {
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2944
|
+
const slateElement = this.children[index];
|
|
2945
|
+
if (slateElement && children.indexOf(slateElement) >= 0) {
|
|
2946
|
+
rootNodes.forEach(rootNode => {
|
|
2947
|
+
setPreRenderingElementStyle(this.viewContext.editor, rootNode, true);
|
|
2948
|
+
});
|
|
2949
|
+
if (isDebug) {
|
|
2950
|
+
debugLog('log', 'preRenderingHTMLElement index: ', this.viewContext.editor.children.indexOf(this.children[index]), 'is clear true');
|
|
2951
|
+
}
|
|
2952
|
+
}
|
|
2953
|
+
else {
|
|
2954
|
+
if (isDebug) {
|
|
2955
|
+
debugLog('log', 'preRenderingHTMLElement index: ', this.viewContext.editor.children.indexOf(this.children[index]), 'do not clear since it would be removed soon');
|
|
2956
|
+
}
|
|
2957
|
+
}
|
|
2947
2958
|
});
|
|
2948
2959
|
this.preRenderingHTMLElement = [];
|
|
2949
2960
|
}
|
|
@@ -3051,6 +3062,20 @@ class ListRender {
|
|
|
3051
3062
|
setPreRenderingElementStyle(this.viewContext.editor, rootNode);
|
|
3052
3063
|
});
|
|
3053
3064
|
this.preRenderingHTMLElement.push(rootNodes);
|
|
3065
|
+
if (isDebug) {
|
|
3066
|
+
debugLog('log', 'preRenderingHTMLElement index: ', this.viewContext.editor.children.indexOf(children[i]));
|
|
3067
|
+
}
|
|
3068
|
+
}
|
|
3069
|
+
}
|
|
3070
|
+
if (isDebug) {
|
|
3071
|
+
for (let i = 0; i < children.length; i++) {
|
|
3072
|
+
const rootNodes = [...getRootNodes(this.views[i], this.blockCards[i])];
|
|
3073
|
+
const index = this.viewContext.editor.children.indexOf(children[i]);
|
|
3074
|
+
const height = getRealHeightByElement(this.viewContext.editor, children[i]);
|
|
3075
|
+
rootNodes.forEach(rootNode => {
|
|
3076
|
+
rootNode.setAttribute('debug-index', index.toString());
|
|
3077
|
+
rootNode.setAttribute('debug-height', height.toString());
|
|
3078
|
+
});
|
|
3054
3079
|
}
|
|
3055
3080
|
}
|
|
3056
3081
|
}
|
|
@@ -3488,6 +3513,7 @@ class SlateEditable {
|
|
|
3488
3513
|
autoScroll &&
|
|
3489
3514
|
this.virtualScrollConfig.scrollContainer) {
|
|
3490
3515
|
this.virtualScrollConfig.scrollContainer.scrollTop = this.virtualScrollConfig.scrollContainer.scrollTop + 100;
|
|
3516
|
+
this.isUpdatingSelection = false;
|
|
3491
3517
|
return;
|
|
3492
3518
|
}
|
|
3493
3519
|
else {
|
|
@@ -3587,7 +3613,6 @@ class SlateEditable {
|
|
|
3587
3613
|
if (isDebug && remeasureIndics.length > 0) {
|
|
3588
3614
|
console.log('remeasure height by indics: ', remeasureIndics);
|
|
3589
3615
|
}
|
|
3590
|
-
measureHeightByIndics(this.editor, remeasureIndics, true);
|
|
3591
3616
|
}
|
|
3592
3617
|
updateContext() {
|
|
3593
3618
|
const decorations = this.generateDecorations();
|