@pixldocs/canvas-renderer 0.5.298 → 0.5.299
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-BzOCkAOn.cjs → index-DUUr9uZ0.cjs} +33 -5
- package/dist/index-DUUr9uZ0.cjs.map +1 -0
- package/dist/{index-72P860wB.js → index-Ddn4TvlA.js} +33 -5
- package/dist/index-Ddn4TvlA.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-CL-maCe-.js → vectorPdfExport-C1obEkji.js} +4 -4
- package/dist/{vectorPdfExport-CL-maCe-.js.map → vectorPdfExport-C1obEkji.js.map} +1 -1
- package/dist/{vectorPdfExport-BrPykWdO.cjs → vectorPdfExport-DeL1bsjM.cjs} +4 -4
- package/dist/{vectorPdfExport-BrPykWdO.cjs.map → vectorPdfExport-DeL1bsjM.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-72P860wB.js.map +0 -1
- package/dist/index-BzOCkAOn.cjs.map +0 -1
|
@@ -13618,6 +13618,34 @@ const PageCanvas = react.forwardRef(
|
|
|
13618
13618
|
const asRect0 = obj.getBoundingRect();
|
|
13619
13619
|
let didReflowTextChild = false;
|
|
13620
13620
|
for (const child of obj.getObjects()) {
|
|
13621
|
+
if (child instanceof fabric__namespace.FabricImage && !child.__cropGroup && !child.smartElementType) {
|
|
13622
|
+
if (isXSide) {
|
|
13623
|
+
if (child.__asLiveOrigW == null) {
|
|
13624
|
+
child.__asLiveOrigW = (child.width ?? 0) * (child.scaleX ?? 1);
|
|
13625
|
+
}
|
|
13626
|
+
const origW = child.__asLiveOrigW;
|
|
13627
|
+
const newW = Math.max(1, origW * sAxis);
|
|
13628
|
+
if (Math.abs((child.width ?? 0) - newW) > 0.5) {
|
|
13629
|
+
child._set("width", newW);
|
|
13630
|
+
child._set("scaleX", 1 / sAxis);
|
|
13631
|
+
child.setCoords();
|
|
13632
|
+
child.dirty = true;
|
|
13633
|
+
}
|
|
13634
|
+
} else {
|
|
13635
|
+
if (child.__asLiveOrigH == null) {
|
|
13636
|
+
child.__asLiveOrigH = (child.height ?? 0) * (child.scaleY ?? 1);
|
|
13637
|
+
}
|
|
13638
|
+
const origH = child.__asLiveOrigH;
|
|
13639
|
+
const newH = Math.max(1, origH * sAxis);
|
|
13640
|
+
if (Math.abs((child.height ?? 0) - newH) > 0.5) {
|
|
13641
|
+
child._set("height", newH);
|
|
13642
|
+
child._set("scaleY", 1 / sAxis);
|
|
13643
|
+
child.setCoords();
|
|
13644
|
+
child.dirty = true;
|
|
13645
|
+
}
|
|
13646
|
+
}
|
|
13647
|
+
continue;
|
|
13648
|
+
}
|
|
13621
13649
|
if (!(child instanceof fabric__namespace.Textbox)) continue;
|
|
13622
13650
|
if (isXSide) {
|
|
13623
13651
|
if (child.__asLiveOrigW == null) {
|
|
@@ -23945,9 +23973,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23945
23973
|
}
|
|
23946
23974
|
return svgString;
|
|
23947
23975
|
}
|
|
23948
|
-
const resolvedPackageVersion = "0.5.
|
|
23976
|
+
const resolvedPackageVersion = "0.5.299";
|
|
23949
23977
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23950
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23978
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.299";
|
|
23951
23979
|
const roundParityValue = (value) => {
|
|
23952
23980
|
if (typeof value !== "number") return value;
|
|
23953
23981
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24761,7 +24789,7 @@ class PixldocsRenderer {
|
|
|
24761
24789
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24762
24790
|
}
|
|
24763
24791
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24764
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
24792
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-DeL1bsjM.cjs"));
|
|
24765
24793
|
const prepared = preparePagesForExport(
|
|
24766
24794
|
cloned.pages,
|
|
24767
24795
|
canvasWidth,
|
|
@@ -27081,7 +27109,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27081
27109
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27082
27110
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27083
27111
|
try {
|
|
27084
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27112
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-DeL1bsjM.cjs"));
|
|
27085
27113
|
try {
|
|
27086
27114
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27087
27115
|
} catch {
|
|
@@ -27478,4 +27506,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27478
27506
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27479
27507
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27480
27508
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27481
|
-
//# sourceMappingURL=index-
|
|
27509
|
+
//# sourceMappingURL=index-DUUr9uZ0.cjs.map
|