@pixldocs/canvas-renderer 0.5.486 → 0.5.487
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.
- package/dist/{index-CahlaWb5.js → index-CqRau2aM.js} +13 -8
- package/dist/{index-CahlaWb5.js.map → index-CqRau2aM.js.map} +1 -1
- package/dist/{index-smRSw8bm.cjs → index-eyHORcg9.cjs} +13 -8
- package/dist/{index-smRSw8bm.cjs.map → index-eyHORcg9.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-DnsSdLBw.js → vectorPdfExport-CjRFYSDp.js} +4 -4
- package/dist/{vectorPdfExport-DnsSdLBw.js.map → vectorPdfExport-CjRFYSDp.js.map} +1 -1
- package/dist/{vectorPdfExport-BepYq3oJ.cjs → vectorPdfExport-SQN2BQR0.cjs} +4 -4
- package/dist/{vectorPdfExport-BepYq3oJ.cjs.map → vectorPdfExport-SQN2BQR0.cjs.map} +1 -1
- package/package.json +1 -1
|
@@ -16031,7 +16031,9 @@ const PageCanvas = react.forwardRef(
|
|
|
16031
16031
|
return !!(node && isGroup(node));
|
|
16032
16032
|
});
|
|
16033
16033
|
const activeSelectionHadTransform = activeObj instanceof fabric__namespace.ActiveSelection && (Math.abs((activeObj.scaleX ?? 1) - 1) > 0.01 || Math.abs((activeObj.scaleY ?? 1) - 1) > 0.01 || Math.abs((activeObj.angle ?? 0) % 360) > 0.01);
|
|
16034
|
-
|
|
16034
|
+
const activeLogicalGroupSelectionId = activeObj instanceof fabric__namespace.ActiveSelection ? activeObj.__pixldocsGroupSelection : void 0;
|
|
16035
|
+
const isPureLogicalGroupMoveWithCrop = !!(anyCropGroup && activeLogicalGroupSelectionId && activeSelectionDelta && !activeSelectionHadTransform);
|
|
16036
|
+
if ((!anyCropGroup || isPureLogicalGroupMoveWithCrop) && activeSelectionDelta && !activeSelectionHadTransform && selectedLogicalGroupIds.length > 0) {
|
|
16035
16037
|
const selectedStoreIds = useEditorStore.getState().canvas.selectedIds ?? [];
|
|
16036
16038
|
const groupMemberIds = /* @__PURE__ */ new Set();
|
|
16037
16039
|
selectedLogicalGroupIds.forEach((gid) => {
|
|
@@ -16071,7 +16073,7 @@ const PageCanvas = react.forwardRef(
|
|
|
16071
16073
|
return;
|
|
16072
16074
|
}
|
|
16073
16075
|
}
|
|
16074
|
-
if (selectedElementIds.length > 0 && !anyCropGroup) {
|
|
16076
|
+
if (selectedElementIds.length > 0 && (!anyCropGroup || isPureLogicalGroupMoveWithCrop)) {
|
|
16075
16077
|
const firstObj = activeObjects[0];
|
|
16076
16078
|
const firstId = getObjectId(firstObj);
|
|
16077
16079
|
const parentGroups = selectedElementIds.map((id) => findParentGroup(pageChildren2, id)).filter((g) => g !== null);
|
|
@@ -16093,7 +16095,10 @@ const PageCanvas = react.forwardRef(
|
|
|
16093
16095
|
const groupAbs = getAbsoluteBounds(groupToMove, pageChildren2);
|
|
16094
16096
|
let movedGroupLeft = groupAbs.left;
|
|
16095
16097
|
let movedGroupTop = groupAbs.top;
|
|
16096
|
-
if (activeObj instanceof fabric__namespace.ActiveSelection &&
|
|
16098
|
+
if (activeObj instanceof fabric__namespace.ActiveSelection && activeLogicalGroupSelectionId === groupToMove.id && activeSelectionDelta && !activeSelectionHadTransform) {
|
|
16099
|
+
movedGroupLeft = groupAbs.left + activeSelectionDelta.x;
|
|
16100
|
+
movedGroupTop = groupAbs.top + activeSelectionDelta.y;
|
|
16101
|
+
} else if (activeObj instanceof fabric__namespace.ActiveSelection && (transformStart == null ? void 0 : transformStart.groupId) === groupToMove.id) {
|
|
16097
16102
|
const live = lastLiveSelectionRectRef.current;
|
|
16098
16103
|
const selectionRect = live && live.selection === activeObj ? { left: live.left, top: live.top } : activeObj.getBoundingRect();
|
|
16099
16104
|
movedGroupLeft = transformStart.groupLeft + (selectionRect.left - transformStart.selectionLeft);
|
|
@@ -26435,9 +26440,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
26435
26440
|
}
|
|
26436
26441
|
return svgString;
|
|
26437
26442
|
}
|
|
26438
|
-
const resolvedPackageVersion = "0.5.
|
|
26443
|
+
const resolvedPackageVersion = "0.5.487";
|
|
26439
26444
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
26440
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
26445
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.487";
|
|
26441
26446
|
const roundParityValue = (value) => {
|
|
26442
26447
|
if (typeof value !== "number") return value;
|
|
26443
26448
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -27251,7 +27256,7 @@ class PixldocsRenderer {
|
|
|
27251
27256
|
await this.waitForCanvasScene(container, cloned, i);
|
|
27252
27257
|
}
|
|
27253
27258
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
27254
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27259
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-SQN2BQR0.cjs"));
|
|
27255
27260
|
const prepared = preparePagesForExport(
|
|
27256
27261
|
cloned.pages,
|
|
27257
27262
|
canvasWidth,
|
|
@@ -29571,7 +29576,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
29571
29576
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
29572
29577
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
29573
29578
|
try {
|
|
29574
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
29579
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-SQN2BQR0.cjs"));
|
|
29575
29580
|
try {
|
|
29576
29581
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
29577
29582
|
} catch {
|
|
@@ -29885,4 +29890,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
29885
29890
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
29886
29891
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
29887
29892
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
29888
|
-
//# sourceMappingURL=index-
|
|
29893
|
+
//# sourceMappingURL=index-eyHORcg9.cjs.map
|