@pixldocs/canvas-renderer 0.5.260 → 0.5.261
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/dist/{index-Dh9WY10e.js → index-CUdaMZ-i.js} +31 -8
- package/dist/index-CUdaMZ-i.js.map +1 -0
- package/dist/{index-iahevkuu.cjs → index-Dfc18rpJ.cjs} +31 -8
- package/dist/index-Dfc18rpJ.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-DuUmVQWJ.cjs → vectorPdfExport-BsjP4JQb.cjs} +4 -4
- package/dist/{vectorPdfExport-DuUmVQWJ.cjs.map → vectorPdfExport-BsjP4JQb.cjs.map} +1 -1
- package/dist/{vectorPdfExport-D4Vl-GPD.js → vectorPdfExport-Q4d_WUkp.js} +4 -4
- package/dist/{vectorPdfExport-D4Vl-GPD.js.map → vectorPdfExport-Q4d_WUkp.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-Dh9WY10e.js.map +0 -1
- package/dist/index-iahevkuu.cjs.map +0 -1
|
@@ -13487,6 +13487,8 @@ const PageCanvas = forwardRef(
|
|
|
13487
13487
|
const asSy0 = obj.scaleY ?? 1;
|
|
13488
13488
|
const asLeft0 = obj.left ?? 0;
|
|
13489
13489
|
const asTop0 = obj.top ?? 0;
|
|
13490
|
+
const asRect0 = obj.getBoundingRect();
|
|
13491
|
+
let didReflowTextChild = false;
|
|
13490
13492
|
for (const child of obj.getObjects()) {
|
|
13491
13493
|
if (!(child instanceof fabric.Textbox)) continue;
|
|
13492
13494
|
if (isXSide) {
|
|
@@ -13502,7 +13504,9 @@ const PageCanvas = forwardRef(
|
|
|
13502
13504
|
child.initDimensions();
|
|
13503
13505
|
} catch {
|
|
13504
13506
|
}
|
|
13507
|
+
child.setCoords();
|
|
13505
13508
|
child.dirty = true;
|
|
13509
|
+
didReflowTextChild = true;
|
|
13506
13510
|
}
|
|
13507
13511
|
} else {
|
|
13508
13512
|
if (child.__asLiveOrigH == null) {
|
|
@@ -13516,16 +13520,35 @@ const PageCanvas = forwardRef(
|
|
|
13516
13520
|
child.initDimensions();
|
|
13517
13521
|
} catch {
|
|
13518
13522
|
}
|
|
13523
|
+
child.setCoords();
|
|
13519
13524
|
child.dirty = true;
|
|
13525
|
+
didReflowTextChild = true;
|
|
13520
13526
|
}
|
|
13521
13527
|
}
|
|
13528
|
+
if (isXSide && didReflowTextChild && typeof obj.triggerLayout === "function") {
|
|
13529
|
+
try {
|
|
13530
|
+
obj.triggerLayout();
|
|
13531
|
+
} catch {
|
|
13532
|
+
}
|
|
13533
|
+
obj._set("width", asW0);
|
|
13534
|
+
obj._set("scaleX", asSx0);
|
|
13535
|
+
obj._set("scaleY", asSy0);
|
|
13536
|
+
obj.setCoords();
|
|
13537
|
+
const afterRect = obj.getBoundingRect();
|
|
13538
|
+
const fixedLeft = asRect0.left;
|
|
13539
|
+
const fixedRight = asRect0.left + asRect0.width;
|
|
13540
|
+
const nextLeft = corner === "ml" ? (obj.left ?? 0) + (fixedRight - (afterRect.left + afterRect.width)) : (obj.left ?? 0) + (fixedLeft - afterRect.left);
|
|
13541
|
+
obj._set("left", nextLeft);
|
|
13542
|
+
} else {
|
|
13543
|
+
obj._set("height", asH0);
|
|
13544
|
+
obj._set("left", asLeft0);
|
|
13545
|
+
obj._set("top", asTop0);
|
|
13546
|
+
}
|
|
13522
13547
|
obj._set("width", asW0);
|
|
13523
|
-
obj._set("height", asH0);
|
|
13524
13548
|
obj._set("scaleX", asSx0);
|
|
13525
13549
|
obj._set("scaleY", asSy0);
|
|
13526
|
-
obj._set("left", asLeft0);
|
|
13527
|
-
obj._set("top", asTop0);
|
|
13528
13550
|
obj.setCoords();
|
|
13551
|
+
obj.dirty = true;
|
|
13529
13552
|
}
|
|
13530
13553
|
}
|
|
13531
13554
|
snapDuringScaleCallback(obj, corner);
|
|
@@ -23542,9 +23565,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23542
23565
|
}
|
|
23543
23566
|
return svgString;
|
|
23544
23567
|
}
|
|
23545
|
-
const resolvedPackageVersion = "0.5.
|
|
23568
|
+
const resolvedPackageVersion = "0.5.261";
|
|
23546
23569
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23547
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23570
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.261";
|
|
23548
23571
|
const roundParityValue = (value) => {
|
|
23549
23572
|
if (typeof value !== "number") return value;
|
|
23550
23573
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24358,7 +24381,7 @@ class PixldocsRenderer {
|
|
|
24358
24381
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24359
24382
|
}
|
|
24360
24383
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24361
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
24384
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-Q4d_WUkp.js");
|
|
24362
24385
|
const prepared = preparePagesForExport(
|
|
24363
24386
|
cloned.pages,
|
|
24364
24387
|
canvasWidth,
|
|
@@ -26678,7 +26701,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26678
26701
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26679
26702
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26680
26703
|
try {
|
|
26681
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
26704
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-Q4d_WUkp.js");
|
|
26682
26705
|
try {
|
|
26683
26706
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26684
26707
|
} catch {
|
|
@@ -27078,4 +27101,4 @@ export {
|
|
|
27078
27101
|
buildTeaserBlurFlatKeys as y,
|
|
27079
27102
|
collectFontDescriptorsFromConfig as z
|
|
27080
27103
|
};
|
|
27081
|
-
//# sourceMappingURL=index-
|
|
27104
|
+
//# sourceMappingURL=index-CUdaMZ-i.js.map
|