@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-cjs.js CHANGED
@@ -18847,7 +18847,7 @@ class DocumentChange {
18847
18847
  }
18848
18848
  }
18849
18849
  if (this.viewOptions.docMode === exports.DocMode.FormEdit) {
18850
- this.deleteRangeInFormEdit(selectedRange);
18850
+ this.deleteRangeInFormEdit(selectedRange, startPointElement);
18851
18851
  }
18852
18852
  else {
18853
18853
  this.deleteRange(selectedRange);
@@ -19298,12 +19298,14 @@ class DocumentChange {
19298
19298
  * @param range
19299
19299
  * @returns
19300
19300
  */
19301
- deleteRangeInFormEdit(range) {
19301
+ deleteRangeInFormEdit(range, startPointElement) {
19302
19302
  const dataElement = ElementUtil.getDataElement(range.target);
19303
19303
  //在数据元内删除,调用普通的删除处理
19304
19304
  if (dataElement) {
19305
19305
  this.deleteRange(range);
19306
- this.selectionState.resetRange(dataElement.startDecorate, 1);
19306
+ if (!startPointElement || ElementUtil.getParent(startPointElement, item => item instanceof DataElementInlineGroup) !== dataElement) {
19307
+ this.selectionState.resetRange(dataElement.startDecorate, 1);
19308
+ }
19307
19309
  return;
19308
19310
  }
19309
19311
  //在数据元外删除
@@ -26000,7 +26002,7 @@ class DocumentPrintOffscreenBase {
26000
26002
  // });
26001
26003
  this.afterRenderEvent.subscribe((event) => {
26002
26004
  const { index, renderCtx, docRender, pageSvgVNode } = event;
26003
- if (index === options.startDocIndex) {
26005
+ if (index === options.startDocIndex && options.startY !== 0) {
26004
26006
  const bodyRender = docRender.getChild(1);
26005
26007
  let x = bodyRender.rect.x, y = options.startY, width = bodyRender.rect.width, height = bodyRender.rect.height - (options.startY - bodyRender.rect.y);
26006
26008
  // if (options.startDocIndex === options.endDocIndex) {
@@ -26018,7 +26020,8 @@ class DocumentPrintOffscreenBase {
26018
26020
  // }
26019
26021
  });
26020
26022
  await this.prepare(data);
26021
- const canvasNodes = this.getSvgNodes(this.documentPaint.docPages, null);
26023
+ const printRanges = new Array(this.documentPaint.docPages.length).fill(0).map((item, index) => index).filter(index => index >= options.startDocIndex);
26024
+ const canvasNodes = this.getSvgNodes(this.documentPaint.docPages, printRanges);
26022
26025
  if (!canvasNodes.length) {
26023
26026
  console.warn('无可打印页');
26024
26027
  return;
@@ -28358,7 +28361,7 @@ class DocEditor {
28358
28361
  rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
28359
28362
  }
28360
28363
  version() {
28361
- return "2.0.42";
28364
+ return "2.0.44";
28362
28365
  }
28363
28366
  }
28364
28367