@pixldocs/canvas-renderer 0.5.438 → 0.5.439

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.
@@ -15123,7 +15123,7 @@ const PageCanvas = forwardRef(
15123
15123
  const normalizedScaleAngle = ((obj.angle ?? 0) % 360 + 360) % 360;
15124
15124
  const isRotatedActiveSelectionCorner = obj instanceof fabric.ActiveSelection && isCornerResizeHandle(corner) && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
15125
15125
  const isRotatedActiveSelectionSide = obj instanceof fabric.ActiveSelection && (corner === "mt" || corner === "mb" || corner === "ml" || corner === "mr") && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
15126
- const isRotatedSingleObjectScale = !(obj instanceof fabric.ActiveSelection) && isCornerResizeHandle(corner) && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
15126
+ const isRotatedSingleObjectScale = !(obj instanceof fabric.ActiveSelection) && (isCornerResizeHandle(corner) || corner === "mt" || corner === "mb" || corner === "ml" || corner === "mr") && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
15127
15127
  if (!isRotatedActiveSelectionCorner && !isRotatedActiveSelectionSide && !isRotatedSingleObjectScale) {
15128
15128
  snapDuringScaleCallback(obj, corner);
15129
15129
  }
@@ -15248,8 +15248,12 @@ const PageCanvas = forwardRef(
15248
15248
  const sourceEl = objId ? elementsRef.current.find((el) => el.id === objId) : void 0;
15249
15249
  bakeTextboxScaleIntoTypography(obj, sourceEl);
15250
15250
  }
15251
- snapDuringScaleCallback(obj, corner);
15252
- const scaleGuides = calculateScaleSnapGuidesCallback(obj, corner);
15251
+ const normResizeAngle = ((obj.angle ?? 0) % 360 + 360) % 360;
15252
+ const isRotatedSingleResize = !(obj instanceof fabric.ActiveSelection) && Math.min(normResizeAngle, 360 - normResizeAngle) > 0.5;
15253
+ if (!isRotatedSingleResize) {
15254
+ snapDuringScaleCallback(obj, corner);
15255
+ }
15256
+ const scaleGuides = isRotatedSingleResize ? [] : calculateScaleSnapGuidesCallback(obj, corner);
15253
15257
  const gridGuidesForTextResize = [];
15254
15258
  try {
15255
15259
  const psGrid = projectSettingsRef.current;
@@ -25831,9 +25835,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
25831
25835
  }
25832
25836
  return svgString;
25833
25837
  }
25834
- const resolvedPackageVersion = "0.5.438";
25838
+ const resolvedPackageVersion = "0.5.439";
25835
25839
  const PACKAGE_VERSION = resolvedPackageVersion;
25836
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.438";
25840
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.439";
25837
25841
  const roundParityValue = (value) => {
25838
25842
  if (typeof value !== "number") return value;
25839
25843
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -26647,7 +26651,7 @@ class PixldocsRenderer {
26647
26651
  await this.waitForCanvasScene(container, cloned, i);
26648
26652
  }
26649
26653
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
26650
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-ddzCO9sg.js");
26654
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DNxCx3pQ.js");
26651
26655
  const prepared = preparePagesForExport(
26652
26656
  cloned.pages,
26653
26657
  canvasWidth,
@@ -28967,7 +28971,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
28967
28971
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
28968
28972
  sanitizeSvgTreeForPdf(svgToDraw);
28969
28973
  try {
28970
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-ddzCO9sg.js");
28974
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DNxCx3pQ.js");
28971
28975
  try {
28972
28976
  await logTextMeasurementDiagnostic(svgToDraw);
28973
28977
  } catch {
@@ -29367,4 +29371,4 @@ export {
29367
29371
  buildTeaserBlurFlatKeys as y,
29368
29372
  collectFontDescriptorsFromConfig as z
29369
29373
  };
29370
- //# sourceMappingURL=index-BIvYSBXQ.js.map
29374
+ //# sourceMappingURL=index-C7_iudsO.js.map