@pixldocs/canvas-renderer 0.5.259 → 0.5.260
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-DhFcz1Sq.js → index-Dh9WY10e.js} +21 -7
- package/dist/index-Dh9WY10e.js.map +1 -0
- package/dist/{index-CUomvTwt.cjs → index-iahevkuu.cjs} +21 -7
- package/dist/index-iahevkuu.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-CNA_nPL_.js → vectorPdfExport-D4Vl-GPD.js} +4 -4
- package/dist/{vectorPdfExport-CNA_nPL_.js.map → vectorPdfExport-D4Vl-GPD.js.map} +1 -1
- package/dist/{vectorPdfExport-Bbu4wM29.cjs → vectorPdfExport-DuUmVQWJ.cjs} +4 -4
- package/dist/{vectorPdfExport-Bbu4wM29.cjs.map → vectorPdfExport-DuUmVQWJ.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-CUomvTwt.cjs.map +0 -1
- package/dist/index-DhFcz1Sq.js.map +0 -1
|
@@ -13499,6 +13499,12 @@ const PageCanvas = react.forwardRef(
|
|
|
13499
13499
|
const isXSide = corner === "ml" || corner === "mr";
|
|
13500
13500
|
const sAxis = isXSide ? Math.abs(obj.scaleX ?? 1) : Math.abs(obj.scaleY ?? 1);
|
|
13501
13501
|
if (sAxis > 1e-3) {
|
|
13502
|
+
const asW0 = obj.width ?? 0;
|
|
13503
|
+
const asH0 = obj.height ?? 0;
|
|
13504
|
+
const asSx0 = obj.scaleX ?? 1;
|
|
13505
|
+
const asSy0 = obj.scaleY ?? 1;
|
|
13506
|
+
const asLeft0 = obj.left ?? 0;
|
|
13507
|
+
const asTop0 = obj.top ?? 0;
|
|
13502
13508
|
for (const child of obj.getObjects()) {
|
|
13503
13509
|
if (!(child instanceof fabric__namespace.Textbox)) continue;
|
|
13504
13510
|
if (isXSide) {
|
|
@@ -13508,7 +13514,8 @@ const PageCanvas = react.forwardRef(
|
|
|
13508
13514
|
const origW = child.__asLiveOrigW;
|
|
13509
13515
|
const newW = Math.max(20, origW * sAxis);
|
|
13510
13516
|
if (Math.abs((child.width ?? 0) - newW) > 0.5) {
|
|
13511
|
-
child.
|
|
13517
|
+
child._set("width", newW);
|
|
13518
|
+
child._set("scaleX", 1 / sAxis);
|
|
13512
13519
|
try {
|
|
13513
13520
|
child.initDimensions();
|
|
13514
13521
|
} catch {
|
|
@@ -13522,7 +13529,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13522
13529
|
const origH = child.__asLiveOrigH;
|
|
13523
13530
|
const newH = Math.max(20, origH * sAxis);
|
|
13524
13531
|
child.minBoxHeight = newH;
|
|
13525
|
-
child.
|
|
13532
|
+
child._set("scaleY", 1 / sAxis);
|
|
13526
13533
|
try {
|
|
13527
13534
|
child.initDimensions();
|
|
13528
13535
|
} catch {
|
|
@@ -13530,6 +13537,13 @@ const PageCanvas = react.forwardRef(
|
|
|
13530
13537
|
child.dirty = true;
|
|
13531
13538
|
}
|
|
13532
13539
|
}
|
|
13540
|
+
obj._set("width", asW0);
|
|
13541
|
+
obj._set("height", asH0);
|
|
13542
|
+
obj._set("scaleX", asSx0);
|
|
13543
|
+
obj._set("scaleY", asSy0);
|
|
13544
|
+
obj._set("left", asLeft0);
|
|
13545
|
+
obj._set("top", asTop0);
|
|
13546
|
+
obj.setCoords();
|
|
13533
13547
|
}
|
|
13534
13548
|
}
|
|
13535
13549
|
snapDuringScaleCallback(obj, corner);
|
|
@@ -23546,9 +23560,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23546
23560
|
}
|
|
23547
23561
|
return svgString;
|
|
23548
23562
|
}
|
|
23549
|
-
const resolvedPackageVersion = "0.5.
|
|
23563
|
+
const resolvedPackageVersion = "0.5.260";
|
|
23550
23564
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23551
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23565
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.260";
|
|
23552
23566
|
const roundParityValue = (value) => {
|
|
23553
23567
|
if (typeof value !== "number") return value;
|
|
23554
23568
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24362,7 +24376,7 @@ class PixldocsRenderer {
|
|
|
24362
24376
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24363
24377
|
}
|
|
24364
24378
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24365
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
24379
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-DuUmVQWJ.cjs"));
|
|
24366
24380
|
const prepared = preparePagesForExport(
|
|
24367
24381
|
cloned.pages,
|
|
24368
24382
|
canvasWidth,
|
|
@@ -26682,7 +26696,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26682
26696
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26683
26697
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26684
26698
|
try {
|
|
26685
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26699
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-DuUmVQWJ.cjs"));
|
|
26686
26700
|
try {
|
|
26687
26701
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26688
26702
|
} catch {
|
|
@@ -27079,4 +27093,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27079
27093
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27080
27094
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27081
27095
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27082
|
-
//# sourceMappingURL=index-
|
|
27096
|
+
//# sourceMappingURL=index-iahevkuu.cjs.map
|