@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.
@@ -13736,6 +13736,10 @@ const PageCanvas = forwardRef(
13736
13736
  const isXSide = corner === "ml" || corner === "mr";
13737
13737
  const sAxis = isXSide ? Math.abs(obj.scaleX ?? 1) : Math.abs(obj.scaleY ?? 1);
13738
13738
  if (sAxis > 1e-3) {
13739
+ const hasRotatedChild = obj.getObjects().some((c) => {
13740
+ const a = ((c.angle ?? 0) % 180 + 180) % 180;
13741
+ return !(a < 0.5 || a > 179.5);
13742
+ });
13739
13743
  if (isXSide && ((_b2 = groupShiftReflowSnapshotRef.current) == null ? void 0 : _b2.selection) !== obj) {
13740
13744
  groupShiftReflowSnapshotRef.current = null;
13741
13745
  const logicalGroupId = obj.__pixldocsGroupSelection;
@@ -13771,7 +13775,7 @@ const PageCanvas = forwardRef(
13771
13775
  const asTop0 = obj.top ?? 0;
13772
13776
  const asRect0 = obj.getBoundingRect();
13773
13777
  let didReflowTextChild = false;
13774
- for (const child of obj.getObjects()) {
13778
+ for (const child of hasRotatedChild ? [] : obj.getObjects()) {
13775
13779
  if (child instanceof fabric.Group && (child.__cropGroup || ((_d = child._ct) == null ? void 0 : _d.isCropGroup))) {
13776
13780
  const ct = child.__cropData;
13777
13781
  if (!ct) continue;
@@ -13942,6 +13946,15 @@ const PageCanvas = forwardRef(
13942
13946
  obj._set("width", asW0);
13943
13947
  obj._set("scaleX", asSx0);
13944
13948
  obj._set("scaleY", asSy0);
13949
+ if (hasRotatedChild) {
13950
+ if (isXSide) {
13951
+ obj._set("width", asW0 * sAxis);
13952
+ obj._set("scaleX", 1);
13953
+ } else {
13954
+ obj._set("height", asH0 * sAxis);
13955
+ obj._set("scaleY", 1);
13956
+ }
13957
+ }
13945
13958
  obj.setCoords();
13946
13959
  obj.dirty = true;
13947
13960
  }
@@ -24245,9 +24258,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
24245
24258
  }
24246
24259
  return svgString;
24247
24260
  }
24248
- const resolvedPackageVersion = "0.5.326";
24261
+ const resolvedPackageVersion = "0.5.327";
24249
24262
  const PACKAGE_VERSION = resolvedPackageVersion;
24250
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.326";
24263
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.327";
24251
24264
  const roundParityValue = (value) => {
24252
24265
  if (typeof value !== "number") return value;
24253
24266
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -25061,7 +25074,7 @@ class PixldocsRenderer {
25061
25074
  await this.waitForCanvasScene(container, cloned, i);
25062
25075
  }
25063
25076
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
25064
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-N0-ZYAKl.js");
25077
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DE3LhODY.js");
25065
25078
  const prepared = preparePagesForExport(
25066
25079
  cloned.pages,
25067
25080
  canvasWidth,
@@ -27381,7 +27394,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
27381
27394
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
27382
27395
  sanitizeSvgTreeForPdf(svgToDraw);
27383
27396
  try {
27384
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-N0-ZYAKl.js");
27397
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DE3LhODY.js");
27385
27398
  try {
27386
27399
  await logTextMeasurementDiagnostic(svgToDraw);
27387
27400
  } catch {
@@ -27781,4 +27794,4 @@ export {
27781
27794
  buildTeaserBlurFlatKeys as y,
27782
27795
  collectFontDescriptorsFromConfig as z
27783
27796
  };
27784
- //# sourceMappingURL=index-CXrA6xYG.js.map
27797
+ //# sourceMappingURL=index-LJNw8NgB.js.map