@pixldocs/canvas-renderer 0.5.327 → 0.5.328
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-LJNw8NgB.js → index-36ORX_k2.js} +22 -12
- package/dist/index-36ORX_k2.js.map +1 -0
- package/dist/{index-CAK9gioW.cjs → index-DhowYy-T.cjs} +22 -12
- package/dist/index-DhowYy-T.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-wr9G37iK.cjs → vectorPdfExport-B4Vpz8di.cjs} +4 -4
- package/dist/{vectorPdfExport-wr9G37iK.cjs.map → vectorPdfExport-B4Vpz8di.cjs.map} +1 -1
- package/dist/{vectorPdfExport-DE3LhODY.js → vectorPdfExport-CKg43wpe.js} +4 -4
- package/dist/{vectorPdfExport-DE3LhODY.js.map → vectorPdfExport-CKg43wpe.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-CAK9gioW.cjs.map +0 -1
- package/dist/index-LJNw8NgB.js.map +0 -1
|
@@ -13775,7 +13775,17 @@ const PageCanvas = forwardRef(
|
|
|
13775
13775
|
const asTop0 = obj.top ?? 0;
|
|
13776
13776
|
const asRect0 = obj.getBoundingRect();
|
|
13777
13777
|
let didReflowTextChild = false;
|
|
13778
|
-
|
|
13778
|
+
if (hasRotatedChild) {
|
|
13779
|
+
if (isXSide) {
|
|
13780
|
+
obj._set("width", asW0 * sAxis);
|
|
13781
|
+
obj._set("scaleX", 1);
|
|
13782
|
+
} else {
|
|
13783
|
+
obj._set("height", asH0 * sAxis);
|
|
13784
|
+
obj._set("scaleY", 1);
|
|
13785
|
+
}
|
|
13786
|
+
}
|
|
13787
|
+
const childCounterScale = hasRotatedChild ? 1 : 1 / sAxis;
|
|
13788
|
+
for (const child of obj.getObjects()) {
|
|
13779
13789
|
if (child instanceof fabric.Group && (child.__cropGroup || ((_d = child._ct) == null ? void 0 : _d.isCropGroup))) {
|
|
13780
13790
|
const ct = child.__cropData;
|
|
13781
13791
|
if (!ct) continue;
|
|
@@ -13789,7 +13799,7 @@ const PageCanvas = forwardRef(
|
|
|
13789
13799
|
if (Math.abs((child.width ?? 0) - newW) > 0.5) {
|
|
13790
13800
|
ct.frameW = newW;
|
|
13791
13801
|
child._set("width", newW);
|
|
13792
|
-
child._set("scaleX",
|
|
13802
|
+
child._set("scaleX", childCounterScale);
|
|
13793
13803
|
try {
|
|
13794
13804
|
updateCoverLayout(child);
|
|
13795
13805
|
} catch {
|
|
@@ -13807,7 +13817,7 @@ const PageCanvas = forwardRef(
|
|
|
13807
13817
|
if (Math.abs((child.height ?? 0) - newH) > 0.5) {
|
|
13808
13818
|
ct.frameH = newH;
|
|
13809
13819
|
child._set("height", newH);
|
|
13810
|
-
child._set("scaleY",
|
|
13820
|
+
child._set("scaleY", childCounterScale);
|
|
13811
13821
|
try {
|
|
13812
13822
|
updateCoverLayout(child);
|
|
13813
13823
|
} catch {
|
|
@@ -13827,7 +13837,7 @@ const PageCanvas = forwardRef(
|
|
|
13827
13837
|
const newW = Math.max(1, origW * sAxis);
|
|
13828
13838
|
if (Math.abs((child.width ?? 0) - newW) > 0.5) {
|
|
13829
13839
|
child._set("width", newW);
|
|
13830
|
-
child._set("scaleX",
|
|
13840
|
+
child._set("scaleX", childCounterScale);
|
|
13831
13841
|
child.setCoords();
|
|
13832
13842
|
child.dirty = true;
|
|
13833
13843
|
}
|
|
@@ -13839,7 +13849,7 @@ const PageCanvas = forwardRef(
|
|
|
13839
13849
|
const newH = Math.max(1, origH * sAxis);
|
|
13840
13850
|
if (Math.abs((child.height ?? 0) - newH) > 0.5) {
|
|
13841
13851
|
child._set("height", newH);
|
|
13842
|
-
child._set("scaleY",
|
|
13852
|
+
child._set("scaleY", childCounterScale);
|
|
13843
13853
|
child.setCoords();
|
|
13844
13854
|
child.dirty = true;
|
|
13845
13855
|
}
|
|
@@ -13855,7 +13865,7 @@ const PageCanvas = forwardRef(
|
|
|
13855
13865
|
const newW = Math.max(20, origW * sAxis);
|
|
13856
13866
|
if (Math.abs((child.width ?? 0) - newW) > 0.5) {
|
|
13857
13867
|
child._set("width", newW);
|
|
13858
|
-
child._set("scaleX",
|
|
13868
|
+
child._set("scaleX", childCounterScale);
|
|
13859
13869
|
try {
|
|
13860
13870
|
child.initDimensions();
|
|
13861
13871
|
} catch {
|
|
@@ -13871,7 +13881,7 @@ const PageCanvas = forwardRef(
|
|
|
13871
13881
|
const origH = child.__asLiveOrigH;
|
|
13872
13882
|
const newH = Math.max(20, origH * sAxis);
|
|
13873
13883
|
child.minBoxHeight = newH;
|
|
13874
|
-
child._set("scaleY",
|
|
13884
|
+
child._set("scaleY", childCounterScale);
|
|
13875
13885
|
try {
|
|
13876
13886
|
child.initDimensions();
|
|
13877
13887
|
} catch {
|
|
@@ -24258,9 +24268,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24258
24268
|
}
|
|
24259
24269
|
return svgString;
|
|
24260
24270
|
}
|
|
24261
|
-
const resolvedPackageVersion = "0.5.
|
|
24271
|
+
const resolvedPackageVersion = "0.5.328";
|
|
24262
24272
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24263
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24273
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.328";
|
|
24264
24274
|
const roundParityValue = (value) => {
|
|
24265
24275
|
if (typeof value !== "number") return value;
|
|
24266
24276
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25074,7 +25084,7 @@ class PixldocsRenderer {
|
|
|
25074
25084
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25075
25085
|
}
|
|
25076
25086
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25077
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25087
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CKg43wpe.js");
|
|
25078
25088
|
const prepared = preparePagesForExport(
|
|
25079
25089
|
cloned.pages,
|
|
25080
25090
|
canvasWidth,
|
|
@@ -27394,7 +27404,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27394
27404
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27395
27405
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27396
27406
|
try {
|
|
27397
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27407
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CKg43wpe.js");
|
|
27398
27408
|
try {
|
|
27399
27409
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27400
27410
|
} catch {
|
|
@@ -27794,4 +27804,4 @@ export {
|
|
|
27794
27804
|
buildTeaserBlurFlatKeys as y,
|
|
27795
27805
|
collectFontDescriptorsFromConfig as z
|
|
27796
27806
|
};
|
|
27797
|
-
//# sourceMappingURL=index-
|
|
27807
|
+
//# sourceMappingURL=index-36ORX_k2.js.map
|