@hailin-zheng/editor-core 2.0.32 → 2.0.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.js CHANGED
@@ -11131,14 +11131,19 @@ class ElementUtil {
11131
11131
  static getContinueVMergeRenderRows(render, rowIndex, colIndex) {
11132
11132
  const rows = [];
11133
11133
  for (let i = rowIndex + 1; i < render.length; i++) {
11134
- const rowRender = render.getChild(i);
11135
- const rowEle = rowRender.element;
11136
- const ele = rowEle.getChild(colIndex);
11137
- const { vMerge } = ele.props;
11138
- if (vMerge !== 'continue') {
11139
- break;
11134
+ try {
11135
+ const rowRender = render.getChild(i);
11136
+ const rowEle = rowRender.element;
11137
+ const ele = rowEle.getChild(colIndex);
11138
+ const { vMerge } = ele.props;
11139
+ if (vMerge !== 'continue') {
11140
+ break;
11141
+ }
11142
+ rows.push(rowRender);
11143
+ }
11144
+ catch (e) {
11145
+ throw e;
11140
11146
  }
11141
- rows.push(rowRender);
11142
11147
  }
11143
11148
  return rows;
11144
11149
  }
@@ -27238,10 +27243,10 @@ class DocEditor {
27238
27243
  }
27239
27244
  getCursorRect() {
27240
27245
  try {
27241
- if (!this.selectionState.editable) {
27246
+ const { startControl, startOffset } = this.selectionState;
27247
+ if (!this.documentEvent.startHitInfo || (startControl && !startControl.parent)) {
27242
27248
  return { x: 0, y: 0, width: 0, height: 0 };
27243
27249
  }
27244
- const { startControl, startOffset } = this.selectionState;
27245
27250
  const { startRegion, hitDocIndex } = this.documentEvent.startHitInfo;
27246
27251
  const cursorPos = DocumentCursor.getElementCursorPos(startControl, startOffset, startRegion, hitDocIndex);
27247
27252
  return cursorPos.rect;
@@ -27266,6 +27271,7 @@ class DocEditor {
27266
27271
  this.editInput.style.left = pos ? pos.x + 'px' : '-2px';
27267
27272
  this.editInput.style.top = pos ? pos.y + 'px' : '-2px';
27268
27273
  this.editInput.readOnly = true;
27274
+ this.editInput.style.width = "0";
27269
27275
  //this.editInput.style.display = 'none';
27270
27276
  !reset && this.editInput.focus();
27271
27277
  }
@@ -27277,6 +27283,7 @@ class DocEditor {
27277
27283
  this.editInput.style.left = position.x + 'px';
27278
27284
  this.editInput.style.top = position.y + 'px';
27279
27285
  this.editInput.style.height = position.height + 'px';
27286
+ this.editInput.style.width = "1px";
27280
27287
  this.editInput.readOnly = false;
27281
27288
  this.setCursorVisibility(true);
27282
27289
  //this.setCursorInputStatus();
@@ -28269,6 +28276,9 @@ class DocEditor {
28269
28276
  }
28270
28277
  rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
28271
28278
  }
28279
+ version() {
28280
+ return "2.0.34";
28281
+ }
28272
28282
  }
28273
28283
 
28274
28284
  /**