@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-cjs.js
CHANGED
@@ -1331,10 +1331,10 @@ class BranchElement extends Element {
|
|
1331
1331
|
}
|
1332
1332
|
else {
|
1333
1333
|
this.modifyFlag = exports.ModifyFlag.Modify;
|
1334
|
-
clearChildrenRenderCache(this);
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1334
|
+
//clearChildrenRenderCache(this);
|
1335
|
+
for (let i = 0; i < this.length; i++) {
|
1336
|
+
this.getChild(i).pubOnChange('to-child');
|
1337
|
+
}
|
1338
1338
|
}
|
1339
1339
|
this._onChangeEvent.next();
|
1340
1340
|
}
|
@@ -4007,14 +4007,14 @@ class TableRowElement extends BlockContainerElement {
|
|
4007
4007
|
constructor() {
|
4008
4008
|
super('tr');
|
4009
4009
|
this.props = new TableRowProps();
|
4010
|
+
}
|
4011
|
+
beginMeasure(data) {
|
4012
|
+
super.beginMeasure(data);
|
4010
4013
|
//在差异更新中,由于行内单元格存在合并行的情况,需要将当前行内存在合并的单元格,将其修改标志改为修改
|
4011
|
-
|
4012
|
-
|
4013
|
-
|
4014
|
-
|
4015
|
-
}
|
4016
|
-
});
|
4017
|
-
this.addsubscribe(this, changeSub);
|
4014
|
+
if (this.modifyFlag === exports.ModifyFlag.Track) {
|
4015
|
+
this.checkRowModifyState();
|
4016
|
+
this.pubOnChange('to-child');
|
4017
|
+
}
|
4018
4018
|
}
|
4019
4019
|
/**
|
4020
4020
|
* 解决纵向合并行的行缓存高度bug
|
@@ -5992,11 +5992,14 @@ class ElementSerialize {
|
|
5992
5992
|
* @param viewOptions
|
5993
5993
|
*/
|
5994
5994
|
static serialize(element, viewOptions) {
|
5995
|
+
const result = element.serialize(viewOptions);
|
5996
|
+
if (!result) {
|
5997
|
+
return null;
|
5998
|
+
}
|
5999
|
+
if (result.complete) {
|
6000
|
+
return result;
|
6001
|
+
}
|
5995
6002
|
if (element instanceof BranchElement) {
|
5996
|
-
const result = element.serialize(viewOptions);
|
5997
|
-
if (!result || result.complete) {
|
5998
|
-
return result;
|
5999
|
-
}
|
6000
6003
|
result.children = [];
|
6001
6004
|
let prevEle = null;
|
6002
6005
|
for (let i = 0; i < element.length; i++) {
|
@@ -6011,9 +6014,6 @@ class ElementSerialize {
|
|
6011
6014
|
if (serializeChild) {
|
6012
6015
|
delete serializeChild.complete;
|
6013
6016
|
serializeChild.props = serializeChild.props || {};
|
6014
|
-
if (child.props && child.props['__attachedProperty']) {
|
6015
|
-
serializeChild.props['__attachedProperty'] = CommonUtil.cloneValue(child.props['__attachedProperty']);
|
6016
|
-
}
|
6017
6017
|
if (Object.keys(serializeChild.props).length === 0) {
|
6018
6018
|
delete serializeChild.props;
|
6019
6019
|
}
|
@@ -6026,9 +6026,10 @@ class ElementSerialize {
|
|
6026
6026
|
}
|
6027
6027
|
return result;
|
6028
6028
|
}
|
6029
|
-
|
6030
|
-
|
6029
|
+
if (element.props && element.props['__attachedProperty'] && !result.props['__attachedProperty']) {
|
6030
|
+
result.props['__attachedProperty'] = CommonUtil.cloneValue(element.props['__attachedProperty']);
|
6031
6031
|
}
|
6032
|
+
return result;
|
6032
6033
|
}
|
6033
6034
|
static serializeString(element, options = { all: false }) {
|
6034
6035
|
if (!options.all && element instanceof TrackRunElement && element.type === exports.TrackRunTypeEnum.Deleted) {
|
@@ -16540,7 +16541,7 @@ class DocumentChange {
|
|
16540
16541
|
}
|
16541
16542
|
getCursorElementByDeleteAction(control) {
|
16542
16543
|
const prevLeafElementInPara = ElementUtil.getRecursionPrevSiblingElement(control, false, true, this.viewOptions);
|
16543
|
-
|
16544
|
+
//是否为同一段落
|
16544
16545
|
if (prevLeafElementInPara && ElementUtil.isInSameParagraph(prevLeafElementInPara, control)) {
|
16545
16546
|
return {
|
16546
16547
|
ele: prevLeafElementInPara,
|