@hailin-zheng/editor-core 2.0.42 → 2.0.44

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
@@ -18817,7 +18817,7 @@ class DocumentChange {
18817
18817
  }
18818
18818
  }
18819
18819
  if (this.viewOptions.docMode === DocMode.FormEdit) {
18820
- this.deleteRangeInFormEdit(selectedRange);
18820
+ this.deleteRangeInFormEdit(selectedRange, startPointElement);
18821
18821
  }
18822
18822
  else {
18823
18823
  this.deleteRange(selectedRange);
@@ -19268,12 +19268,14 @@ class DocumentChange {
19268
19268
  * @param range
19269
19269
  * @returns
19270
19270
  */
19271
- deleteRangeInFormEdit(range) {
19271
+ deleteRangeInFormEdit(range, startPointElement) {
19272
19272
  const dataElement = ElementUtil.getDataElement(range.target);
19273
19273
  //在数据元内删除,调用普通的删除处理
19274
19274
  if (dataElement) {
19275
19275
  this.deleteRange(range);
19276
- this.selectionState.resetRange(dataElement.startDecorate, 1);
19276
+ if (!startPointElement || ElementUtil.getParent(startPointElement, item => item instanceof DataElementInlineGroup) !== dataElement) {
19277
+ this.selectionState.resetRange(dataElement.startDecorate, 1);
19278
+ }
19277
19279
  return;
19278
19280
  }
19279
19281
  //在数据元外删除
@@ -25970,7 +25972,7 @@ class DocumentPrintOffscreenBase {
25970
25972
  // });
25971
25973
  this.afterRenderEvent.subscribe((event) => {
25972
25974
  const { index, renderCtx, docRender, pageSvgVNode } = event;
25973
- if (index === options.startDocIndex) {
25975
+ if (index === options.startDocIndex && options.startY !== 0) {
25974
25976
  const bodyRender = docRender.getChild(1);
25975
25977
  let x = bodyRender.rect.x, y = options.startY, width = bodyRender.rect.width, height = bodyRender.rect.height - (options.startY - bodyRender.rect.y);
25976
25978
  // if (options.startDocIndex === options.endDocIndex) {
@@ -25988,7 +25990,8 @@ class DocumentPrintOffscreenBase {
25988
25990
  // }
25989
25991
  });
25990
25992
  await this.prepare(data);
25991
- const canvasNodes = this.getSvgNodes(this.documentPaint.docPages, null);
25993
+ const printRanges = new Array(this.documentPaint.docPages.length).fill(0).map((item, index) => index).filter(index => index >= options.startDocIndex);
25994
+ const canvasNodes = this.getSvgNodes(this.documentPaint.docPages, printRanges);
25992
25995
  if (!canvasNodes.length) {
25993
25996
  console.warn('无可打印页');
25994
25997
  return;
@@ -28328,7 +28331,7 @@ class DocEditor {
28328
28331
  rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
28329
28332
  }
28330
28333
  version() {
28331
- return "2.0.42";
28334
+ return "2.0.44";
28332
28335
  }
28333
28336
  }
28334
28337