@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
|
@@ -14054,7 +14054,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14054
14054
|
};
|
|
14055
14055
|
fabricCanvas.__updateDrilledGroupOutline = updateDrilledGroupOutline;
|
|
14056
14056
|
fabricCanvas.on("mouse:down:before", (opt) => {
|
|
14057
|
-
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
14057
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
14058
14058
|
const activeBeforeMouseDown = fabricCanvas.getActiveObject();
|
|
14059
14059
|
if (editLockRef.current) {
|
|
14060
14060
|
const active = fabricCanvas.getActiveObject();
|
|
@@ -14183,8 +14183,9 @@ const PageCanvas = react.forwardRef(
|
|
|
14183
14183
|
try {
|
|
14184
14184
|
const activeForCornerCheck = fabricCanvas.getActiveObject();
|
|
14185
14185
|
if (activeForCornerCheck) {
|
|
14186
|
-
const
|
|
14187
|
-
const
|
|
14186
|
+
const vpPtr = ((_n = fabricCanvas.getViewportPoint) == null ? void 0 : _n.call(fabricCanvas, opt.e)) ?? fabricCanvas.getPointer(opt.e);
|
|
14187
|
+
const scenePtr = fabricCanvas.getPointer(opt.e);
|
|
14188
|
+
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));
|
|
14188
14189
|
if (cornerHit) {
|
|
14189
14190
|
return;
|
|
14190
14191
|
}
|
|
@@ -15140,14 +15141,15 @@ const PageCanvas = react.forwardRef(
|
|
|
15140
15141
|
const normalizedScaleAngle = ((obj.angle ?? 0) % 360 + 360) % 360;
|
|
15141
15142
|
const isRotatedActiveSelectionCorner = obj instanceof fabric__namespace.ActiveSelection && isCornerResizeHandle(corner) && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
|
|
15142
15143
|
const isRotatedActiveSelectionSide = obj instanceof fabric__namespace.ActiveSelection && (corner === "mt" || corner === "mb" || corner === "ml" || corner === "mr") && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
|
|
15143
|
-
|
|
15144
|
+
const isRotatedSingleObjectScale = !(obj instanceof fabric__namespace.ActiveSelection) && isCornerResizeHandle(corner) && Math.min(normalizedScaleAngle, 360 - normalizedScaleAngle) > 0.5;
|
|
15145
|
+
if (!isRotatedActiveSelectionCorner && !isRotatedActiveSelectionSide && !isRotatedSingleObjectScale) {
|
|
15144
15146
|
snapDuringScaleCallback(obj, corner);
|
|
15145
15147
|
}
|
|
15146
|
-
const scaleGuides = isRotatedActiveSelectionCorner || isRotatedActiveSelectionSide ? [] : calculateScaleSnapGuidesCallback(obj, corner);
|
|
15148
|
+
const scaleGuides = isRotatedActiveSelectionCorner || isRotatedActiveSelectionSide || isRotatedSingleObjectScale ? [] : calculateScaleSnapGuidesCallback(obj, corner);
|
|
15147
15149
|
const gridGuidesForScale = [];
|
|
15148
15150
|
try {
|
|
15149
15151
|
const psGrid = projectSettingsRef.current;
|
|
15150
|
-
const canApplyGridSnap = psGrid.snapToGrid && corner && !isRotatedActiveSelectionCorner && !isRotatedActiveSelectionSide && !obj.__cropGroup && !obj.__resizeSnapHandler;
|
|
15152
|
+
const canApplyGridSnap = psGrid.snapToGrid && corner && !isRotatedActiveSelectionCorner && !isRotatedActiveSelectionSide && !isRotatedSingleObjectScale && !obj.__cropGroup && !obj.__resizeSnapHandler;
|
|
15151
15153
|
if (canApplyGridSnap) {
|
|
15152
15154
|
const gridX = psGrid.gridSizeX ?? psGrid.gridSize ?? 0;
|
|
15153
15155
|
const gridY = psGrid.gridSizeY ?? psGrid.gridSize ?? 0;
|
|
@@ -25847,9 +25849,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
25847
25849
|
}
|
|
25848
25850
|
return svgString;
|
|
25849
25851
|
}
|
|
25850
|
-
const resolvedPackageVersion = "0.5.
|
|
25852
|
+
const resolvedPackageVersion = "0.5.438";
|
|
25851
25853
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
25852
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
25854
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.438";
|
|
25853
25855
|
const roundParityValue = (value) => {
|
|
25854
25856
|
if (typeof value !== "number") return value;
|
|
25855
25857
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -26663,7 +26665,7 @@ class PixldocsRenderer {
|
|
|
26663
26665
|
await this.waitForCanvasScene(container, cloned, i);
|
|
26664
26666
|
}
|
|
26665
26667
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
26666
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26668
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-DW6SkA07.cjs"));
|
|
26667
26669
|
const prepared = preparePagesForExport(
|
|
26668
26670
|
cloned.pages,
|
|
26669
26671
|
canvasWidth,
|
|
@@ -28983,7 +28985,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
28983
28985
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
28984
28986
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
28985
28987
|
try {
|
|
28986
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
28988
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-DW6SkA07.cjs"));
|
|
28987
28989
|
try {
|
|
28988
28990
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
28989
28991
|
} catch {
|
|
@@ -29380,4 +29382,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
29380
29382
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
29381
29383
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
29382
29384
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
29383
|
-
//# sourceMappingURL=index-
|
|
29385
|
+
//# sourceMappingURL=index-BIAXZTHb.cjs.map
|