@pixldocs/canvas-renderer 0.5.296 → 0.5.297

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.
@@ -13937,7 +13937,7 @@ const PageCanvas = forwardRef(
13937
13937
  });
13938
13938
  let cropGroupSaveTimer = null;
13939
13939
  fabricCanvas.on("object:modified", (e) => {
13940
- var _a2, _b2, _c, _d, _e, _f, _g;
13940
+ var _a2, _b2, _c, _d, _e, _f, _g, _h;
13941
13941
  try {
13942
13942
  dragStarted = false;
13943
13943
  setGuides([]);
@@ -14584,16 +14584,16 @@ const PageCanvas = forwardRef(
14584
14584
  obj.initDimensions();
14585
14585
  obj.objectCaching = prevObjCaching;
14586
14586
  if (sx > 0 && sy > 0) {
14587
- obj.set({ scaleX: 1 / sx, scaleY: 1 / sy });
14588
- const asTx = Number(decomposed.translateX ?? 0);
14589
- const asTy = Number(decomposed.translateY ?? 0);
14590
- const localCx = (preBakeCenter.x - asTx) / sx;
14591
- const localCy = (preBakeCenter.y - asTy) / sy;
14592
- const localWidth = bakedWidth * (1 / sx);
14593
- const localHeight = (obj.height ?? intrinsicHeight) * (1 / sy);
14587
+ const localScaleX = 1 / sx;
14588
+ const localScaleY = 1 / sy;
14589
+ obj.set({ scaleX: localScaleX, scaleY: localScaleY });
14590
+ const selectionMatrix = (_g = activeObj == null ? void 0 : activeObj.calcTransformMatrix) == null ? void 0 : _g.call(activeObj);
14591
+ const localCenter = selectionMatrix ? fabric.util.transformPoint(preBakeCenter, fabric.util.invertTransform(selectionMatrix)) : preBakeCenter;
14592
+ const localWidth = bakedWidth * localScaleX;
14593
+ const localHeight = (obj.height ?? intrinsicHeight) * localScaleY;
14594
14594
  obj.set({
14595
- left: localCx - localWidth / 2,
14596
- top: localCy - localHeight / 2
14595
+ left: localCenter.x - localWidth / 2,
14596
+ top: localCenter.y - localHeight / 2
14597
14597
  });
14598
14598
  } else {
14599
14599
  obj.setPositionByOrigin(preBakeCenter, "center", "center");
@@ -14739,7 +14739,7 @@ const PageCanvas = forwardRef(
14739
14739
  updateElement(objId, elementUpdate, { recordHistory: false, skipLayoutRecalc: true });
14740
14740
  obj.setCoords();
14741
14741
  }
14742
- const pageChildrenForReflow = ((_g = useEditorStore.getState().canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _g.children) ?? [];
14742
+ const pageChildrenForReflow = ((_h = useEditorStore.getState().canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _h.children) ?? [];
14743
14743
  const stackGroupsToReflow = /* @__PURE__ */ new Set();
14744
14744
  for (const id of modifiedIdsThisRound) {
14745
14745
  const parent = findParentGroup(pageChildrenForReflow, id);
@@ -23839,9 +23839,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
23839
23839
  }
23840
23840
  return svgString;
23841
23841
  }
23842
- const resolvedPackageVersion = "0.5.296";
23842
+ const resolvedPackageVersion = "0.5.297";
23843
23843
  const PACKAGE_VERSION = resolvedPackageVersion;
23844
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.296";
23844
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.297";
23845
23845
  const roundParityValue = (value) => {
23846
23846
  if (typeof value !== "number") return value;
23847
23847
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -24655,7 +24655,7 @@ class PixldocsRenderer {
24655
24655
  await this.waitForCanvasScene(container, cloned, i);
24656
24656
  }
24657
24657
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
24658
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-Lo1YQq71.js");
24658
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DOAlZclW.js");
24659
24659
  const prepared = preparePagesForExport(
24660
24660
  cloned.pages,
24661
24661
  canvasWidth,
@@ -26975,7 +26975,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
26975
26975
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
26976
26976
  sanitizeSvgTreeForPdf(svgToDraw);
26977
26977
  try {
26978
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-Lo1YQq71.js");
26978
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DOAlZclW.js");
26979
26979
  try {
26980
26980
  await logTextMeasurementDiagnostic(svgToDraw);
26981
26981
  } catch {
@@ -27375,4 +27375,4 @@ export {
27375
27375
  buildTeaserBlurFlatKeys as y,
27376
27376
  collectFontDescriptorsFromConfig as z
27377
27377
  };
27378
- //# sourceMappingURL=index-JckTC23Z.js.map
27378
+ //# sourceMappingURL=index-BDVGR-oo.js.map