@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 +4 -3
- package/index-cjs.js.map +1 -1
- package/index.js +4 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -25970,7 +25970,7 @@ class DocumentPrintOffscreenBase {
|
|
25970
25970
|
// });
|
25971
25971
|
this.afterRenderEvent.subscribe((event) => {
|
25972
25972
|
const { index, renderCtx, docRender, pageSvgVNode } = event;
|
25973
|
-
if (index === options.startDocIndex) {
|
25973
|
+
if (index === options.startDocIndex && options.startY !== 0) {
|
25974
25974
|
const bodyRender = docRender.getChild(1);
|
25975
25975
|
let x = bodyRender.rect.x, y = options.startY, width = bodyRender.rect.width, height = bodyRender.rect.height - (options.startY - bodyRender.rect.y);
|
25976
25976
|
// if (options.startDocIndex === options.endDocIndex) {
|
@@ -25988,7 +25988,8 @@ class DocumentPrintOffscreenBase {
|
|
25988
25988
|
// }
|
25989
25989
|
});
|
25990
25990
|
await this.prepare(data);
|
25991
|
-
const
|
25991
|
+
const printRanges = new Array(this.documentPaint.docPages.length).fill(0).map((item, index) => index).filter(index => index >= options.startDocIndex);
|
25992
|
+
const canvasNodes = this.getSvgNodes(this.documentPaint.docPages, printRanges);
|
25992
25993
|
if (!canvasNodes.length) {
|
25993
25994
|
console.warn('无可打印页');
|
25994
25995
|
return;
|
@@ -28328,7 +28329,7 @@ class DocEditor {
|
|
28328
28329
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
28329
28330
|
}
|
28330
28331
|
version() {
|
28331
|
-
return "2.0.
|
28332
|
+
return "2.0.43";
|
28332
28333
|
}
|
28333
28334
|
}
|
28334
28335
|
|