@hailin-zheng/editor-core 1.1.32 → 1.1.34
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 +11 -6
- package/index-cjs.js.map +1 -1
- package/index.js +11 -6
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1214,6 +1214,7 @@ class BranchElement extends Element {
|
|
1214
1214
|
removeChildByIndex(index) {
|
1215
1215
|
const child = this.chilren[index];
|
1216
1216
|
if (child) {
|
1217
|
+
removeEle(child);
|
1217
1218
|
this.chilren.splice(index, 1);
|
1218
1219
|
this.disposeChild(child);
|
1219
1220
|
}
|
@@ -5245,8 +5246,10 @@ class TableUtil {
|
|
5245
5246
|
currCell.props.hMerge = null;
|
5246
5247
|
}
|
5247
5248
|
if (currCell !== startCell) {
|
5248
|
-
|
5249
|
-
|
5249
|
+
if (currCell.getChildLength() !== 2) {
|
5250
|
+
cellContents.push(...ElementUtil.getChildrenElements(currCell.clone(true)));
|
5251
|
+
currCell.clearItems();
|
5252
|
+
}
|
5250
5253
|
}
|
5251
5254
|
}
|
5252
5255
|
}
|
@@ -11490,7 +11493,8 @@ class ParagraphMeasure {
|
|
11490
11493
|
innerLineRect.line.rect.height = finalLineHeight;
|
11491
11494
|
for (let k = 0; k < innerLineRect.line.length; k++) {
|
11492
11495
|
const leaf = innerLineRect.line.getChild(k);
|
11493
|
-
leaf.rect.y = innerLineRect.line.rect.height - paddingBottom - leaf.rect.height;
|
11496
|
+
//leaf.rect.y = innerLineRect.line.rect.height - paddingBottom - leaf.rect.height;
|
11497
|
+
leaf.rect.y = Math.ceil((innerLineRect.line.rect.height - leaf.rect.height) / 2);
|
11494
11498
|
}
|
11495
11499
|
render.addChild(innerLineRect.line);
|
11496
11500
|
}
|
@@ -12257,9 +12261,10 @@ class DocumentArrange {
|
|
12257
12261
|
}
|
12258
12262
|
}
|
12259
12263
|
cutRowRenderItem(render, limitHeight) {
|
12260
|
-
|
12261
|
-
|
12262
|
-
|
12264
|
+
//可能当前行的高度就超过了限制高度,且存在最小高度
|
12265
|
+
// if (render.element.props.minHeight > 0 && render.rect.height < limitHeight) {
|
12266
|
+
// return null;
|
12267
|
+
// }
|
12263
12268
|
const cloneRowRender = render.element.createRenderObject();
|
12264
12269
|
cloneRowRender.rect.width = render.rect.width;
|
12265
12270
|
//cloneRowRender.rect.maxWidth = render.rect.height;
|