@pixldocs/canvas-renderer 0.5.311 → 0.5.312
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-C7ZK-TLB.cjs → index-BVdt88VI.cjs} +37 -21
- package/dist/index-BVdt88VI.cjs.map +1 -0
- package/dist/{index-BGRSqiXc.js → index-P103UWW3.js} +37 -21
- package/dist/index-P103UWW3.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-DouKBaoG.js → vectorPdfExport-D5wEVDWm.js} +4 -4
- package/dist/{vectorPdfExport-DouKBaoG.js.map → vectorPdfExport-D5wEVDWm.js.map} +1 -1
- package/dist/{vectorPdfExport-CgqBRltR.cjs → vectorPdfExport-WWb68zM6.cjs} +4 -4
- package/dist/{vectorPdfExport-CgqBRltR.cjs.map → vectorPdfExport-WWb68zM6.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BGRSqiXc.js.map +0 -1
- package/dist/index-C7ZK-TLB.cjs.map +0 -1
|
@@ -11187,25 +11187,41 @@ function applyWarpAwareSelectionBorders(selection) {
|
|
|
11187
11187
|
selection.hasBorders = true;
|
|
11188
11188
|
selection.hasControls = true;
|
|
11189
11189
|
try {
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
|
|
11194
|
-
|
|
11195
|
-
|
|
11196
|
-
|
|
11197
|
-
|
|
11198
|
-
|
|
11199
|
-
|
|
11190
|
+
if (selection.__pixldocsAlignedAngle == null) {
|
|
11191
|
+
const kids = selection.getObjects();
|
|
11192
|
+
if (kids.length >= 1) {
|
|
11193
|
+
const norm = (a) => {
|
|
11194
|
+
const n = (a % 360 + 360) % 360;
|
|
11195
|
+
return n > 180 ? n - 360 : n;
|
|
11196
|
+
};
|
|
11197
|
+
const first = norm(((_a2 = kids[0]) == null ? void 0 : _a2.angle) ?? 0);
|
|
11198
|
+
let allSame = Math.abs(first) > 0.5;
|
|
11199
|
+
if (allSame) {
|
|
11200
|
+
for (const k of kids) {
|
|
11201
|
+
if (Math.abs(norm(k.angle ?? 0) - first) > 0.5) {
|
|
11202
|
+
allSame = false;
|
|
11203
|
+
break;
|
|
11204
|
+
}
|
|
11205
|
+
}
|
|
11206
|
+
}
|
|
11207
|
+
if (allSame) {
|
|
11208
|
+
const rad = -first * Math.PI / 180;
|
|
11209
|
+
const cos = Math.cos(rad), sin = Math.sin(rad);
|
|
11210
|
+
for (const k of kids) {
|
|
11211
|
+
const x = k.left ?? 0, y = k.top ?? 0;
|
|
11212
|
+
k.set({
|
|
11213
|
+
left: x * cos - y * sin,
|
|
11214
|
+
top: x * sin + y * cos,
|
|
11215
|
+
angle: 0
|
|
11216
|
+
});
|
|
11217
|
+
k.setCoords();
|
|
11218
|
+
}
|
|
11219
|
+
selection.set({ angle: first });
|
|
11220
|
+
selection.setCoords();
|
|
11221
|
+
selection.__pixldocsAlignedAngle = first;
|
|
11200
11222
|
}
|
|
11201
11223
|
}
|
|
11202
11224
|
}
|
|
11203
|
-
selection.setControlsVisibility({
|
|
11204
|
-
ml: !allSameNonZero,
|
|
11205
|
-
mr: !allSameNonZero,
|
|
11206
|
-
mt: !allSameNonZero,
|
|
11207
|
-
mb: !allSameNonZero
|
|
11208
|
-
});
|
|
11209
11225
|
} catch {
|
|
11210
11226
|
}
|
|
11211
11227
|
}
|
|
@@ -24251,9 +24267,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24251
24267
|
}
|
|
24252
24268
|
return svgString;
|
|
24253
24269
|
}
|
|
24254
|
-
const resolvedPackageVersion = "0.5.
|
|
24270
|
+
const resolvedPackageVersion = "0.5.312";
|
|
24255
24271
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24256
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24272
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.312";
|
|
24257
24273
|
const roundParityValue = (value) => {
|
|
24258
24274
|
if (typeof value !== "number") return value;
|
|
24259
24275
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25067,7 +25083,7 @@ class PixldocsRenderer {
|
|
|
25067
25083
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25068
25084
|
}
|
|
25069
25085
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25070
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25086
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-WWb68zM6.cjs"));
|
|
25071
25087
|
const prepared = preparePagesForExport(
|
|
25072
25088
|
cloned.pages,
|
|
25073
25089
|
canvasWidth,
|
|
@@ -27387,7 +27403,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27387
27403
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27388
27404
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27389
27405
|
try {
|
|
27390
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27406
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-WWb68zM6.cjs"));
|
|
27391
27407
|
try {
|
|
27392
27408
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27393
27409
|
} catch {
|
|
@@ -27784,4 +27800,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27784
27800
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27785
27801
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27786
27802
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27787
|
-
//# sourceMappingURL=index-
|
|
27803
|
+
//# sourceMappingURL=index-BVdt88VI.cjs.map
|