@pixldocs/canvas-renderer 0.5.278 → 0.5.280

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.
@@ -14398,10 +14398,15 @@ const PageCanvas = forwardRef(
14398
14398
  const bounds = getNodeBounds(node, pageAfterMove, pageBoundsOptions);
14399
14399
  const __prevLeft = obj.left;
14400
14400
  const __prevTop = obj.top;
14401
- if (obj instanceof fabric.Group && obj.__cropGroup || obj instanceof fabric.FabricImage && (obj.originX === "center" || obj.originY === "center")) {
14402
- obj.set({ left: abs.left + Math.max(1, bounds.width) / 2, top: abs.top + Math.max(1, bounds.height) / 2 });
14401
+ const useCenterAnchor = obj instanceof fabric.Group && obj.__cropGroup || obj instanceof fabric.FabricImage && (obj.originX === "center" || obj.originY === "center");
14402
+ const nextPoint = new fabric.Point(
14403
+ useCenterAnchor ? abs.left + Math.max(1, bounds.width) / 2 : abs.left,
14404
+ useCenterAnchor ? abs.top + Math.max(1, bounds.height) / 2 : abs.top
14405
+ );
14406
+ if (typeof obj.setXY === "function") {
14407
+ obj.setXY(nextPoint, useCenterAnchor ? "center" : "left", useCenterAnchor ? "center" : "top");
14403
14408
  } else {
14404
- obj.set({ left: abs.left, top: abs.top });
14409
+ obj.set({ left: nextPoint.x, top: nextPoint.y });
14405
14410
  }
14406
14411
  obj.setCoords();
14407
14412
  if (shouldLogGroupMove()) {
@@ -14435,10 +14440,7 @@ const PageCanvas = forwardRef(
14435
14440
  }
14436
14441
  setTimeout(() => modifiedIdsThisRound.forEach((id) => justModifiedIdsRef.current.delete(id)), 150);
14437
14442
  groupSelectionTransformStartRef.current = null;
14438
- restorePreservedGroupSelectionSoon({
14439
- memberIds: preservedGroupMemberIds,
14440
- groupSelectionId
14441
- });
14443
+ preserveActiveSelectionAfterTransformRef.current = null;
14442
14444
  unlockEditsSoon();
14443
14445
  return;
14444
14446
  }
@@ -15082,6 +15084,7 @@ const PageCanvas = forwardRef(
15082
15084
  skipSelectionClearOnDiscardRef.current = false;
15083
15085
  }
15084
15086
  }
15087
+ activeSelectionSnapshot.memberIds.forEach((id) => justModifiedIdsRef.current.delete(id));
15085
15088
  }
15086
15089
  const currentFabricObjects = /* @__PURE__ */ new Map();
15087
15090
  fc.getObjects().forEach((obj) => {
@@ -16216,7 +16219,6 @@ const PageCanvas = forwardRef(
16216
16219
  });
16217
16220
  if (isPureSingleGroupSelection) {
16218
16221
  active.hasBorders = true;
16219
- active.setCoords();
16220
16222
  applyWarpAwareSelectionBorders(active);
16221
16223
  }
16222
16224
  }
@@ -23863,9 +23865,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
23863
23865
  }
23864
23866
  return svgString;
23865
23867
  }
23866
- const resolvedPackageVersion = "0.5.278";
23868
+ const resolvedPackageVersion = "0.5.280";
23867
23869
  const PACKAGE_VERSION = resolvedPackageVersion;
23868
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.278";
23870
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.280";
23869
23871
  const roundParityValue = (value) => {
23870
23872
  if (typeof value !== "number") return value;
23871
23873
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -24679,7 +24681,7 @@ class PixldocsRenderer {
24679
24681
  await this.waitForCanvasScene(container, cloned, i);
24680
24682
  }
24681
24683
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
24682
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DZihV42S.js");
24684
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CZKs5Llt.js");
24683
24685
  const prepared = preparePagesForExport(
24684
24686
  cloned.pages,
24685
24687
  canvasWidth,
@@ -26999,7 +27001,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
26999
27001
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
27000
27002
  sanitizeSvgTreeForPdf(svgToDraw);
27001
27003
  try {
27002
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DZihV42S.js");
27004
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CZKs5Llt.js");
27003
27005
  try {
27004
27006
  await logTextMeasurementDiagnostic(svgToDraw);
27005
27007
  } catch {
@@ -27399,4 +27401,4 @@ export {
27399
27401
  buildTeaserBlurFlatKeys as y,
27400
27402
  collectFontDescriptorsFromConfig as z
27401
27403
  };
27402
- //# sourceMappingURL=index-Cui21a0a.js.map
27404
+ //# sourceMappingURL=index-Ce2aM_l6.js.map