@pixldocs/canvas-renderer 0.5.437 → 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.
- package/dist/{index-CiXC9Gkl.js → index-C7_iudsO.js} +15 -10
- package/dist/index-C7_iudsO.js.map +1 -0
- package/dist/{index-DCwSB2lw.cjs → index-CfAPR8q1.cjs} +15 -10
- package/dist/index-CfAPR8q1.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BlzQOLVd.cjs → vectorPdfExport-CTMHlR-q.cjs} +4 -4
- package/dist/{vectorPdfExport-BlzQOLVd.cjs.map → vectorPdfExport-CTMHlR-q.cjs.map} +1 -1
- package/dist/{vectorPdfExport-Go5IZl-i.js → vectorPdfExport-DNxCx3pQ.js} +4 -4
- package/dist/{vectorPdfExport-Go5IZl-i.js.map → vectorPdfExport-DNxCx3pQ.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-CiXC9Gkl.js.map +0 -1
- package/dist/index-DCwSB2lw.cjs.map +0 -1
|
@@ -15141,14 +15141,15 @@ const PageCanvas = react.forwardRef(
|
|
|
15141
15141
|
const normalizedScaleAngle = ((obj.angle ?? 0) % 360 + 360) % 360;
|
|
15142
15142
|
const isRotatedActiveSelectionCorner = obj instanceof fabric__namespace.ActiveSelection && isCornerResizeHandle(corner) && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
|
|
15143
15143
|
const isRotatedActiveSelectionSide = obj instanceof fabric__namespace.ActiveSelection && (corner === "mt" || corner === "mb" || corner === "ml" || corner === "mr") && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
|
|
15144
|
-
|
|
15144
|
+
const isRotatedSingleObjectScale = !(obj instanceof fabric__namespace.ActiveSelection) && (isCornerResizeHandle(corner) || corner === "mt" || corner === "mb" || corner === "ml" || corner === "mr") && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
|
|
15145
|
+
if (!isRotatedActiveSelectionCorner && !isRotatedActiveSelectionSide && !isRotatedSingleObjectScale) {
|
|
15145
15146
|
snapDuringScaleCallback(obj, corner);
|
|
15146
15147
|
}
|
|
15147
|
-
const scaleGuides = isRotatedActiveSelectionCorner || isRotatedActiveSelectionSide ? [] : calculateScaleSnapGuidesCallback(obj, corner);
|
|
15148
|
+
const scaleGuides = isRotatedActiveSelectionCorner || isRotatedActiveSelectionSide || isRotatedSingleObjectScale ? [] : calculateScaleSnapGuidesCallback(obj, corner);
|
|
15148
15149
|
const gridGuidesForScale = [];
|
|
15149
15150
|
try {
|
|
15150
15151
|
const psGrid = projectSettingsRef.current;
|
|
15151
|
-
const canApplyGridSnap = psGrid.snapToGrid && corner && !isRotatedActiveSelectionCorner && !isRotatedActiveSelectionSide && !obj.__cropGroup && !obj.__resizeSnapHandler;
|
|
15152
|
+
const canApplyGridSnap = psGrid.snapToGrid && corner && !isRotatedActiveSelectionCorner && !isRotatedActiveSelectionSide && !isRotatedSingleObjectScale && !obj.__cropGroup && !obj.__resizeSnapHandler;
|
|
15152
15153
|
if (canApplyGridSnap) {
|
|
15153
15154
|
const gridX = psGrid.gridSizeX ?? psGrid.gridSize ?? 0;
|
|
15154
15155
|
const gridY = psGrid.gridSizeY ?? psGrid.gridSize ?? 0;
|
|
@@ -15265,8 +15266,12 @@ const PageCanvas = react.forwardRef(
|
|
|
15265
15266
|
const sourceEl = objId ? elementsRef.current.find((el) => el.id === objId) : void 0;
|
|
15266
15267
|
bakeTextboxScaleIntoTypography(obj, sourceEl);
|
|
15267
15268
|
}
|
|
15268
|
-
|
|
15269
|
-
const
|
|
15269
|
+
const normResizeAngle = ((obj.angle ?? 0) % 360 + 360) % 360;
|
|
15270
|
+
const isRotatedSingleResize = !(obj instanceof fabric__namespace.ActiveSelection) && Math.min(normResizeAngle, 360 - normResizeAngle) > 0.5;
|
|
15271
|
+
if (!isRotatedSingleResize) {
|
|
15272
|
+
snapDuringScaleCallback(obj, corner);
|
|
15273
|
+
}
|
|
15274
|
+
const scaleGuides = isRotatedSingleResize ? [] : calculateScaleSnapGuidesCallback(obj, corner);
|
|
15270
15275
|
const gridGuidesForTextResize = [];
|
|
15271
15276
|
try {
|
|
15272
15277
|
const psGrid = projectSettingsRef.current;
|
|
@@ -25848,9 +25853,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
25848
25853
|
}
|
|
25849
25854
|
return svgString;
|
|
25850
25855
|
}
|
|
25851
|
-
const resolvedPackageVersion = "0.5.
|
|
25856
|
+
const resolvedPackageVersion = "0.5.439";
|
|
25852
25857
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
25853
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
25858
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.439";
|
|
25854
25859
|
const roundParityValue = (value) => {
|
|
25855
25860
|
if (typeof value !== "number") return value;
|
|
25856
25861
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -26664,7 +26669,7 @@ class PixldocsRenderer {
|
|
|
26664
26669
|
await this.waitForCanvasScene(container, cloned, i);
|
|
26665
26670
|
}
|
|
26666
26671
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
26667
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26672
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-CTMHlR-q.cjs"));
|
|
26668
26673
|
const prepared = preparePagesForExport(
|
|
26669
26674
|
cloned.pages,
|
|
26670
26675
|
canvasWidth,
|
|
@@ -28984,7 +28989,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
28984
28989
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
28985
28990
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
28986
28991
|
try {
|
|
28987
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
28992
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-CTMHlR-q.cjs"));
|
|
28988
28993
|
try {
|
|
28989
28994
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
28990
28995
|
} catch {
|
|
@@ -29381,4 +29386,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
29381
29386
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
29382
29387
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
29383
29388
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
29384
|
-
//# sourceMappingURL=index-
|
|
29389
|
+
//# sourceMappingURL=index-CfAPR8q1.cjs.map
|