@pixldocs/canvas-renderer 0.5.436 → 0.5.438
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-MlXEe3pb.cjs → index-BIAXZTHb.cjs} +13 -11
- package/dist/index-BIAXZTHb.cjs.map +1 -0
- package/dist/{index-BNFF4r0P.js → index-BIvYSBXQ.js} +13 -11
- package/dist/index-BIvYSBXQ.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-DssOdenf.cjs → vectorPdfExport-DW6SkA07.cjs} +4 -4
- package/dist/{vectorPdfExport-DssOdenf.cjs.map → vectorPdfExport-DW6SkA07.cjs.map} +1 -1
- package/dist/{vectorPdfExport-BoB0l9eY.js → vectorPdfExport-ddzCO9sg.js} +4 -4
- package/dist/{vectorPdfExport-BoB0l9eY.js.map → vectorPdfExport-ddzCO9sg.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BNFF4r0P.js.map +0 -1
- package/dist/index-MlXEe3pb.cjs.map +0 -1
|
@@ -14036,7 +14036,7 @@ const PageCanvas = forwardRef(
|
|
|
14036
14036
|
};
|
|
14037
14037
|
fabricCanvas.__updateDrilledGroupOutline = updateDrilledGroupOutline;
|
|
14038
14038
|
fabricCanvas.on("mouse:down:before", (opt) => {
|
|
14039
|
-
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
14039
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
14040
14040
|
const activeBeforeMouseDown = fabricCanvas.getActiveObject();
|
|
14041
14041
|
if (editLockRef.current) {
|
|
14042
14042
|
const active = fabricCanvas.getActiveObject();
|
|
@@ -14165,8 +14165,9 @@ const PageCanvas = forwardRef(
|
|
|
14165
14165
|
try {
|
|
14166
14166
|
const activeForCornerCheck = fabricCanvas.getActiveObject();
|
|
14167
14167
|
if (activeForCornerCheck) {
|
|
14168
|
-
const
|
|
14169
|
-
const
|
|
14168
|
+
const vpPtr = ((_n = fabricCanvas.getViewportPoint) == null ? void 0 : _n.call(fabricCanvas, opt.e)) ?? fabricCanvas.getPointer(opt.e);
|
|
14169
|
+
const scenePtr = fabricCanvas.getPointer(opt.e);
|
|
14170
|
+
const cornerHit = ((_o = activeForCornerCheck.findControl) == null ? void 0 : _o.call(activeForCornerCheck, vpPtr)) || ((_p = activeForCornerCheck.findControl) == null ? void 0 : _p.call(activeForCornerCheck, scenePtr)) || ((_q = activeForCornerCheck._findTargetCorner) == null ? void 0 : _q.call(activeForCornerCheck, scenePtr));
|
|
14170
14171
|
if (cornerHit) {
|
|
14171
14172
|
return;
|
|
14172
14173
|
}
|
|
@@ -15122,14 +15123,15 @@ const PageCanvas = forwardRef(
|
|
|
15122
15123
|
const normalizedScaleAngle = ((obj.angle ?? 0) % 360 + 360) % 360;
|
|
15123
15124
|
const isRotatedActiveSelectionCorner = obj instanceof fabric.ActiveSelection && isCornerResizeHandle(corner) && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
|
|
15124
15125
|
const isRotatedActiveSelectionSide = obj instanceof fabric.ActiveSelection && (corner === "mt" || corner === "mb" || corner === "ml" || corner === "mr") && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
|
|
15125
|
-
|
|
15126
|
+
const isRotatedSingleObjectScale = !(obj instanceof fabric.ActiveSelection) && isCornerResizeHandle(corner) && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
|
|
15127
|
+
if (!isRotatedActiveSelectionCorner && !isRotatedActiveSelectionSide && !isRotatedSingleObjectScale) {
|
|
15126
15128
|
snapDuringScaleCallback(obj, corner);
|
|
15127
15129
|
}
|
|
15128
|
-
const scaleGuides = isRotatedActiveSelectionCorner || isRotatedActiveSelectionSide ? [] : calculateScaleSnapGuidesCallback(obj, corner);
|
|
15130
|
+
const scaleGuides = isRotatedActiveSelectionCorner || isRotatedActiveSelectionSide || isRotatedSingleObjectScale ? [] : calculateScaleSnapGuidesCallback(obj, corner);
|
|
15129
15131
|
const gridGuidesForScale = [];
|
|
15130
15132
|
try {
|
|
15131
15133
|
const psGrid = projectSettingsRef.current;
|
|
15132
|
-
const canApplyGridSnap = psGrid.snapToGrid && corner && !isRotatedActiveSelectionCorner && !isRotatedActiveSelectionSide && !obj.__cropGroup && !obj.__resizeSnapHandler;
|
|
15134
|
+
const canApplyGridSnap = psGrid.snapToGrid && corner && !isRotatedActiveSelectionCorner && !isRotatedActiveSelectionSide && !isRotatedSingleObjectScale && !obj.__cropGroup && !obj.__resizeSnapHandler;
|
|
15133
15135
|
if (canApplyGridSnap) {
|
|
15134
15136
|
const gridX = psGrid.gridSizeX ?? psGrid.gridSize ?? 0;
|
|
15135
15137
|
const gridY = psGrid.gridSizeY ?? psGrid.gridSize ?? 0;
|
|
@@ -25829,9 +25831,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
25829
25831
|
}
|
|
25830
25832
|
return svgString;
|
|
25831
25833
|
}
|
|
25832
|
-
const resolvedPackageVersion = "0.5.
|
|
25834
|
+
const resolvedPackageVersion = "0.5.438";
|
|
25833
25835
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
25834
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
25836
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.438";
|
|
25835
25837
|
const roundParityValue = (value) => {
|
|
25836
25838
|
if (typeof value !== "number") return value;
|
|
25837
25839
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -26645,7 +26647,7 @@ class PixldocsRenderer {
|
|
|
26645
26647
|
await this.waitForCanvasScene(container, cloned, i);
|
|
26646
26648
|
}
|
|
26647
26649
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
26648
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
26650
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-ddzCO9sg.js");
|
|
26649
26651
|
const prepared = preparePagesForExport(
|
|
26650
26652
|
cloned.pages,
|
|
26651
26653
|
canvasWidth,
|
|
@@ -28965,7 +28967,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
28965
28967
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
28966
28968
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
28967
28969
|
try {
|
|
28968
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
28970
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-ddzCO9sg.js");
|
|
28969
28971
|
try {
|
|
28970
28972
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
28971
28973
|
} catch {
|
|
@@ -29365,4 +29367,4 @@ export {
|
|
|
29365
29367
|
buildTeaserBlurFlatKeys as y,
|
|
29366
29368
|
collectFontDescriptorsFromConfig as z
|
|
29367
29369
|
};
|
|
29368
|
-
//# sourceMappingURL=index-
|
|
29370
|
+
//# sourceMappingURL=index-BIvYSBXQ.js.map
|