@hailin-zheng/editor-core 1.1.26 → 1.1.28
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.
- package/index-cjs.js +22 -21
- package/index-cjs.js.map +1 -1
- package/index.js +22 -21
- package/index.js.map +1 -1
- package/med_editor/framework/impl/table/table-row-impl.d.ts +2 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1302,10 +1302,10 @@ class BranchElement extends Element {
|
|
1302
1302
|
}
|
1303
1303
|
else {
|
1304
1304
|
this.modifyFlag = ModifyFlag$1.Modify;
|
1305
|
-
clearChildrenRenderCache(this);
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1305
|
+
//clearChildrenRenderCache(this);
|
1306
|
+
for (let i = 0; i < this.length; i++) {
|
1307
|
+
this.getChild(i).pubOnChange('to-child');
|
1308
|
+
}
|
1309
1309
|
}
|
1310
1310
|
this._onChangeEvent.next();
|
1311
1311
|
}
|
@@ -3978,14 +3978,14 @@ class TableRowElement extends BlockContainerElement {
|
|
3978
3978
|
constructor() {
|
3979
3979
|
super('tr');
|
3980
3980
|
this.props = new TableRowProps();
|
3981
|
+
}
|
3982
|
+
beginMeasure(data) {
|
3983
|
+
super.beginMeasure(data);
|
3981
3984
|
//在差异更新中,由于行内单元格存在合并行的情况,需要将当前行内存在合并的单元格,将其修改标志改为修改
|
3982
|
-
|
3983
|
-
|
3984
|
-
|
3985
|
-
|
3986
|
-
}
|
3987
|
-
});
|
3988
|
-
this.addsubscribe(this, changeSub);
|
3985
|
+
if (this.modifyFlag === ModifyFlag$1.Track) {
|
3986
|
+
this.checkRowModifyState();
|
3987
|
+
this.pubOnChange('to-child');
|
3988
|
+
}
|
3989
3989
|
}
|
3990
3990
|
/**
|
3991
3991
|
* 解决纵向合并行的行缓存高度bug
|
@@ -5963,11 +5963,14 @@ class ElementSerialize {
|
|
5963
5963
|
* @param viewOptions
|
5964
5964
|
*/
|
5965
5965
|
static serialize(element, viewOptions) {
|
5966
|
+
const result = element.serialize(viewOptions);
|
5967
|
+
if (!result) {
|
5968
|
+
return null;
|
5969
|
+
}
|
5970
|
+
if (result.complete) {
|
5971
|
+
return result;
|
5972
|
+
}
|
5966
5973
|
if (element instanceof BranchElement) {
|
5967
|
-
const result = element.serialize(viewOptions);
|
5968
|
-
if (!result || result.complete) {
|
5969
|
-
return result;
|
5970
|
-
}
|
5971
5974
|
result.children = [];
|
5972
5975
|
let prevEle = null;
|
5973
5976
|
for (let i = 0; i < element.length; i++) {
|
@@ -5982,9 +5985,6 @@ class ElementSerialize {
|
|
5982
5985
|
if (serializeChild) {
|
5983
5986
|
delete serializeChild.complete;
|
5984
5987
|
serializeChild.props = serializeChild.props || {};
|
5985
|
-
if (child.props && child.props['__attachedProperty']) {
|
5986
|
-
serializeChild.props['__attachedProperty'] = CommonUtil.cloneValue(child.props['__attachedProperty']);
|
5987
|
-
}
|
5988
5988
|
if (Object.keys(serializeChild.props).length === 0) {
|
5989
5989
|
delete serializeChild.props;
|
5990
5990
|
}
|
@@ -5997,9 +5997,10 @@ class ElementSerialize {
|
|
5997
5997
|
}
|
5998
5998
|
return result;
|
5999
5999
|
}
|
6000
|
-
|
6001
|
-
|
6000
|
+
if (element.props && element.props['__attachedProperty'] && !result.props['__attachedProperty']) {
|
6001
|
+
result.props['__attachedProperty'] = CommonUtil.cloneValue(element.props['__attachedProperty']);
|
6002
6002
|
}
|
6003
|
+
return result;
|
6003
6004
|
}
|
6004
6005
|
static serializeString(element, options = { all: false }) {
|
6005
6006
|
if (!options.all && element instanceof TrackRunElement && element.type === TrackRunTypeEnum.Deleted) {
|
@@ -16511,7 +16512,7 @@ class DocumentChange {
|
|
16511
16512
|
}
|
16512
16513
|
getCursorElementByDeleteAction(control) {
|
16513
16514
|
const prevLeafElementInPara = ElementUtil.getRecursionPrevSiblingElement(control, false, true, this.viewOptions);
|
16514
|
-
|
16515
|
+
//是否为同一段落
|
16515
16516
|
if (prevLeafElementInPara && ElementUtil.isInSameParagraph(prevLeafElementInPara, control)) {
|
16516
16517
|
return {
|
16517
16518
|
ele: prevLeafElementInPara,
|