@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
|
@@ -13793,7 +13793,17 @@ const PageCanvas = react.forwardRef(
|
|
|
13793
13793
|
const asTop0 = obj.top ?? 0;
|
|
13794
13794
|
const asRect0 = obj.getBoundingRect();
|
|
13795
13795
|
let didReflowTextChild = false;
|
|
13796
|
-
|
|
13796
|
+
if (hasRotatedChild) {
|
|
13797
|
+
if (isXSide) {
|
|
13798
|
+
obj._set("width", asW0 * sAxis);
|
|
13799
|
+
obj._set("scaleX", 1);
|
|
13800
|
+
} else {
|
|
13801
|
+
obj._set("height", asH0 * sAxis);
|
|
13802
|
+
obj._set("scaleY", 1);
|
|
13803
|
+
}
|
|
13804
|
+
}
|
|
13805
|
+
const childCounterScale = hasRotatedChild ? 1 : 1 / sAxis;
|
|
13806
|
+
for (const child of obj.getObjects()) {
|
|
13797
13807
|
if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_d = child._ct) == null ? void 0 : _d.isCropGroup))) {
|
|
13798
13808
|
const ct = child.__cropData;
|
|
13799
13809
|
if (!ct) continue;
|
|
@@ -13807,7 +13817,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13807
13817
|
if (Math.abs((child.width ?? 0) - newW) > 0.5) {
|
|
13808
13818
|
ct.frameW = newW;
|
|
13809
13819
|
child._set("width", newW);
|
|
13810
|
-
child._set("scaleX",
|
|
13820
|
+
child._set("scaleX", childCounterScale);
|
|
13811
13821
|
try {
|
|
13812
13822
|
updateCoverLayout(child);
|
|
13813
13823
|
} catch {
|
|
@@ -13825,7 +13835,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13825
13835
|
if (Math.abs((child.height ?? 0) - newH) > 0.5) {
|
|
13826
13836
|
ct.frameH = newH;
|
|
13827
13837
|
child._set("height", newH);
|
|
13828
|
-
child._set("scaleY",
|
|
13838
|
+
child._set("scaleY", childCounterScale);
|
|
13829
13839
|
try {
|
|
13830
13840
|
updateCoverLayout(child);
|
|
13831
13841
|
} catch {
|
|
@@ -13845,7 +13855,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13845
13855
|
const newW = Math.max(1, origW * sAxis);
|
|
13846
13856
|
if (Math.abs((child.width ?? 0) - newW) > 0.5) {
|
|
13847
13857
|
child._set("width", newW);
|
|
13848
|
-
child._set("scaleX",
|
|
13858
|
+
child._set("scaleX", childCounterScale);
|
|
13849
13859
|
child.setCoords();
|
|
13850
13860
|
child.dirty = true;
|
|
13851
13861
|
}
|
|
@@ -13857,7 +13867,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13857
13867
|
const newH = Math.max(1, origH * sAxis);
|
|
13858
13868
|
if (Math.abs((child.height ?? 0) - newH) > 0.5) {
|
|
13859
13869
|
child._set("height", newH);
|
|
13860
|
-
child._set("scaleY",
|
|
13870
|
+
child._set("scaleY", childCounterScale);
|
|
13861
13871
|
child.setCoords();
|
|
13862
13872
|
child.dirty = true;
|
|
13863
13873
|
}
|
|
@@ -13873,7 +13883,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13873
13883
|
const newW = Math.max(20, origW * sAxis);
|
|
13874
13884
|
if (Math.abs((child.width ?? 0) - newW) > 0.5) {
|
|
13875
13885
|
child._set("width", newW);
|
|
13876
|
-
child._set("scaleX",
|
|
13886
|
+
child._set("scaleX", childCounterScale);
|
|
13877
13887
|
try {
|
|
13878
13888
|
child.initDimensions();
|
|
13879
13889
|
} catch {
|
|
@@ -13889,7 +13899,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13889
13899
|
const origH = child.__asLiveOrigH;
|
|
13890
13900
|
const newH = Math.max(20, origH * sAxis);
|
|
13891
13901
|
child.minBoxHeight = newH;
|
|
13892
|
-
child._set("scaleY",
|
|
13902
|
+
child._set("scaleY", childCounterScale);
|
|
13893
13903
|
try {
|
|
13894
13904
|
child.initDimensions();
|
|
13895
13905
|
} catch {
|
|
@@ -24276,9 +24286,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24276
24286
|
}
|
|
24277
24287
|
return svgString;
|
|
24278
24288
|
}
|
|
24279
|
-
const resolvedPackageVersion = "0.5.
|
|
24289
|
+
const resolvedPackageVersion = "0.5.328";
|
|
24280
24290
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24281
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24291
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.328";
|
|
24282
24292
|
const roundParityValue = (value) => {
|
|
24283
24293
|
if (typeof value !== "number") return value;
|
|
24284
24294
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25092,7 +25102,7 @@ class PixldocsRenderer {
|
|
|
25092
25102
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25093
25103
|
}
|
|
25094
25104
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25095
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25105
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-B4Vpz8di.cjs"));
|
|
25096
25106
|
const prepared = preparePagesForExport(
|
|
25097
25107
|
cloned.pages,
|
|
25098
25108
|
canvasWidth,
|
|
@@ -27412,7 +27422,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27412
27422
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27413
27423
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27414
27424
|
try {
|
|
27415
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27425
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-B4Vpz8di.cjs"));
|
|
27416
27426
|
try {
|
|
27417
27427
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27418
27428
|
} catch {
|
|
@@ -27809,4 +27819,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27809
27819
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27810
27820
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27811
27821
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27812
|
-
//# sourceMappingURL=index-
|
|
27822
|
+
//# sourceMappingURL=index-DhowYy-T.cjs.map
|