@hailin-zheng/editor-core 2.0.33 → 2.0.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.
package/index-cjs.js CHANGED
@@ -11161,14 +11161,19 @@ class ElementUtil {
11161
11161
  static getContinueVMergeRenderRows(render, rowIndex, colIndex) {
11162
11162
  const rows = [];
11163
11163
  for (let i = rowIndex + 1; i < render.length; i++) {
11164
- const rowRender = render.getChild(i);
11165
- const rowEle = rowRender.element;
11166
- const ele = rowEle.getChild(colIndex);
11167
- const { vMerge } = ele.props;
11168
- if (vMerge !== 'continue') {
11169
- break;
11164
+ try {
11165
+ const rowRender = render.getChild(i);
11166
+ const rowEle = rowRender.element;
11167
+ const ele = rowEle.getChild(colIndex);
11168
+ const { vMerge } = ele.props;
11169
+ if (vMerge !== 'continue') {
11170
+ break;
11171
+ }
11172
+ rows.push(rowRender);
11173
+ }
11174
+ catch (e) {
11175
+ throw e;
11170
11176
  }
11171
- rows.push(rowRender);
11172
11177
  }
11173
11178
  return rows;
11174
11179
  }
@@ -27268,10 +27273,10 @@ class DocEditor {
27268
27273
  }
27269
27274
  getCursorRect() {
27270
27275
  try {
27271
- if (!this.documentEvent.startHitInfo) {
27276
+ const { startControl, startOffset } = this.selectionState;
27277
+ if (!this.documentEvent.startHitInfo || !startControl || (startControl && !startControl.parent)) {
27272
27278
  return { x: 0, y: 0, width: 0, height: 0 };
27273
27279
  }
27274
- const { startControl, startOffset } = this.selectionState;
27275
27280
  const { startRegion, hitDocIndex } = this.documentEvent.startHitInfo;
27276
27281
  const cursorPos = DocumentCursor.getElementCursorPos(startControl, startOffset, startRegion, hitDocIndex);
27277
27282
  return cursorPos.rect;
@@ -28302,7 +28307,7 @@ class DocEditor {
28302
28307
  rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
28303
28308
  }
28304
28309
  version() {
28305
- return "2.0.33";
28310
+ return "2.0.35";
28306
28311
  }
28307
28312
  }
28308
28313