@hailin-zheng/editor-core 2.0.41 → 2.0.43

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
@@ -26000,7 +26000,7 @@ class DocumentPrintOffscreenBase {
26000
26000
  // });
26001
26001
  this.afterRenderEvent.subscribe((event) => {
26002
26002
  const { index, renderCtx, docRender, pageSvgVNode } = event;
26003
- if (index === options.startDocIndex) {
26003
+ if (index === options.startDocIndex && options.startY !== 0) {
26004
26004
  const bodyRender = docRender.getChild(1);
26005
26005
  let x = bodyRender.rect.x, y = options.startY, width = bodyRender.rect.width, height = bodyRender.rect.height - (options.startY - bodyRender.rect.y);
26006
26006
  // if (options.startDocIndex === options.endDocIndex) {
@@ -26018,7 +26018,8 @@ class DocumentPrintOffscreenBase {
26018
26018
  // }
26019
26019
  });
26020
26020
  await this.prepare(data);
26021
- const canvasNodes = this.getSvgNodes(this.documentPaint.docPages, null);
26021
+ const printRanges = new Array(this.documentPaint.docPages.length).fill(0).map((item, index) => index).filter(index => index >= options.startDocIndex);
26022
+ const canvasNodes = this.getSvgNodes(this.documentPaint.docPages, printRanges);
26022
26023
  if (!canvasNodes.length) {
26023
26024
  console.warn('无可打印页');
26024
26025
  return;
@@ -28358,7 +28359,7 @@ class DocEditor {
28358
28359
  rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
28359
28360
  }
28360
28361
  version() {
28361
- return "2.0.41";
28362
+ return "2.0.43";
28362
28363
  }
28363
28364
  }
28364
28365