@hailin-zheng/editor-core 1.1.25 → 1.1.27
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 +18 -15
- package/index-cjs.js.map +1 -1
- package/index.js +18 -15
- package/index.js.map +1 -1
- package/med_editor/framework/element-util.d.ts +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
|
}
|
@@ -3664,7 +3664,7 @@ class DocumentFooterRenderObject extends BlockContainerRenderObject {
|
|
3664
3664
|
const { render, position } = e;
|
3665
3665
|
render.tran(() => {
|
3666
3666
|
//判断页眉是否为输入内容
|
3667
|
-
const isFooterEmpty = ElementUtil.
|
3667
|
+
const isFooterEmpty = ElementUtil.checkEmptyRenderContent(this);
|
3668
3668
|
if (this.element.disableClick && render.drawMode === 'view') {
|
3669
3669
|
if (isFooterEmpty) {
|
3670
3670
|
render.contentContext.setGlobalAlpha(0);
|
@@ -3741,7 +3741,7 @@ class DocumentHeaderRenderObject extends BlockContainerRenderObject {
|
|
3741
3741
|
const { render, position } = e;
|
3742
3742
|
render.tran(() => {
|
3743
3743
|
//判断页眉是否为输入内容
|
3744
|
-
const isHeaderEmpty = ElementUtil.
|
3744
|
+
const isHeaderEmpty = ElementUtil.checkEmptyRenderContent(this);
|
3745
3745
|
//存在输入内容时,绘制页眉-页体分割线
|
3746
3746
|
if (!isHeaderEmpty || !this.element.disableClick) {
|
3747
3747
|
const headerLineY = this.rect.height;
|
@@ -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
|
@@ -7443,7 +7443,7 @@ class ElementUtil {
|
|
7443
7443
|
* 校验是否为空内容
|
7444
7444
|
* @param ele
|
7445
7445
|
*/
|
7446
|
-
static
|
7446
|
+
static checkEmptyRenderContent(ele) {
|
7447
7447
|
if (ele.length === 1) {
|
7448
7448
|
const firstRender = ele.getChild(0);
|
7449
7449
|
if (firstRender instanceof ParagraphRenderObject) {
|
@@ -16511,7 +16511,7 @@ class DocumentChange {
|
|
16511
16511
|
}
|
16512
16512
|
getCursorElementByDeleteAction(control) {
|
16513
16513
|
const prevLeafElementInPara = ElementUtil.getRecursionPrevSiblingElement(control, false, true, this.viewOptions);
|
16514
|
-
|
16514
|
+
//是否为同一段落
|
16515
16515
|
if (prevLeafElementInPara && ElementUtil.isInSameParagraph(prevLeafElementInPara, control)) {
|
16516
16516
|
return {
|
16517
16517
|
ele: prevLeafElementInPara,
|
@@ -17285,6 +17285,9 @@ class ElementTrackManage {
|
|
17285
17285
|
//ele获取的为父容器
|
17286
17286
|
if (index === parentIndex + 1) {
|
17287
17287
|
if (ele instanceof BranchElement) {
|
17288
|
+
if (ele.type === 'tbc' && ele.getChildLength() === 2) {
|
17289
|
+
ele.clearItems();
|
17290
|
+
}
|
17288
17291
|
ele.addChild(target, 0);
|
17289
17292
|
return;
|
17290
17293
|
}
|