@pixldocs/canvas-renderer 0.5.326 → 0.5.327

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.
@@ -13754,6 +13754,10 @@ const PageCanvas = react.forwardRef(
13754
13754
  const isXSide = corner === "ml" || corner === "mr";
13755
13755
  const sAxis = isXSide ? Math.abs(obj.scaleX ?? 1) : Math.abs(obj.scaleY ?? 1);
13756
13756
  if (sAxis > 1e-3) {
13757
+ const hasRotatedChild = obj.getObjects().some((c) => {
13758
+ const a = ((c.angle ?? 0) % 180 + 180) % 180;
13759
+ return !(a < 0.5 || a > 179.5);
13760
+ });
13757
13761
  if (isXSide && ((_b2 = groupShiftReflowSnapshotRef.current) == null ? void 0 : _b2.selection) !== obj) {
13758
13762
  groupShiftReflowSnapshotRef.current = null;
13759
13763
  const logicalGroupId = obj.__pixldocsGroupSelection;
@@ -13789,7 +13793,7 @@ const PageCanvas = react.forwardRef(
13789
13793
  const asTop0 = obj.top ?? 0;
13790
13794
  const asRect0 = obj.getBoundingRect();
13791
13795
  let didReflowTextChild = false;
13792
- for (const child of obj.getObjects()) {
13796
+ for (const child of hasRotatedChild ? [] : obj.getObjects()) {
13793
13797
  if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_d = child._ct) == null ? void 0 : _d.isCropGroup))) {
13794
13798
  const ct = child.__cropData;
13795
13799
  if (!ct) continue;
@@ -13960,6 +13964,15 @@ const PageCanvas = react.forwardRef(
13960
13964
  obj._set("width", asW0);
13961
13965
  obj._set("scaleX", asSx0);
13962
13966
  obj._set("scaleY", asSy0);
13967
+ if (hasRotatedChild) {
13968
+ if (isXSide) {
13969
+ obj._set("width", asW0 * sAxis);
13970
+ obj._set("scaleX", 1);
13971
+ } else {
13972
+ obj._set("height", asH0 * sAxis);
13973
+ obj._set("scaleY", 1);
13974
+ }
13975
+ }
13963
13976
  obj.setCoords();
13964
13977
  obj.dirty = true;
13965
13978
  }
@@ -24263,9 +24276,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
24263
24276
  }
24264
24277
  return svgString;
24265
24278
  }
24266
- const resolvedPackageVersion = "0.5.326";
24279
+ const resolvedPackageVersion = "0.5.327";
24267
24280
  const PACKAGE_VERSION = resolvedPackageVersion;
24268
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.326";
24281
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.327";
24269
24282
  const roundParityValue = (value) => {
24270
24283
  if (typeof value !== "number") return value;
24271
24284
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -25079,7 +25092,7 @@ class PixldocsRenderer {
25079
25092
  await this.waitForCanvasScene(container, cloned, i);
25080
25093
  }
25081
25094
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
25082
- const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-CtjZ9wQ_.cjs"));
25095
+ const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-wr9G37iK.cjs"));
25083
25096
  const prepared = preparePagesForExport(
25084
25097
  cloned.pages,
25085
25098
  canvasWidth,
@@ -27399,7 +27412,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
27399
27412
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
27400
27413
  sanitizeSvgTreeForPdf(svgToDraw);
27401
27414
  try {
27402
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-CtjZ9wQ_.cjs"));
27415
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-wr9G37iK.cjs"));
27403
27416
  try {
27404
27417
  await logTextMeasurementDiagnostic(svgToDraw);
27405
27418
  } catch {
@@ -27796,4 +27809,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
27796
27809
  exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
27797
27810
  exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
27798
27811
  exports.warmTemplateFromForm = warmTemplateFromForm;
27799
- //# sourceMappingURL=index-MMaqERXX.cjs.map
27812
+ //# sourceMappingURL=index-CAK9gioW.cjs.map