@pixldocs/canvas-renderer 0.5.446 → 0.5.448
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-BhfNlcH_.js → index-BruY5wZV.js} +163 -28
- package/dist/index-BruY5wZV.js.map +1 -0
- package/dist/{index-BAQIJf_b.cjs → index-CzxefTLk.cjs} +163 -28
- package/dist/index-CzxefTLk.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-D7WHhcGD.cjs → vectorPdfExport-B9AA07qB.cjs} +4 -4
- package/dist/{vectorPdfExport-D7WHhcGD.cjs.map → vectorPdfExport-B9AA07qB.cjs.map} +1 -1
- package/dist/{vectorPdfExport-DNSgRVdW.js → vectorPdfExport-T3FZHnkS.js} +4 -4
- package/dist/{vectorPdfExport-DNSgRVdW.js.map → vectorPdfExport-T3FZHnkS.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BAQIJf_b.cjs.map +0 -1
- package/dist/index-BhfNlcH_.js.map +0 -1
|
@@ -11668,6 +11668,18 @@ const restorePersistedFlipState = (obj, flipX, flipY, angle) => {
|
|
|
11668
11668
|
obj.setCoords();
|
|
11669
11669
|
obj.dirty = true;
|
|
11670
11670
|
};
|
|
11671
|
+
const isBitmapLikeFabricObject = (obj) => {
|
|
11672
|
+
var _a2;
|
|
11673
|
+
return obj instanceof fabric.FabricImage || obj instanceof fabric.Group && !!(obj.__cropGroup || ((_a2 = obj._ct) == null ? void 0 : _a2.isCropGroup));
|
|
11674
|
+
};
|
|
11675
|
+
const restorePersistedFlipFlagsOnly = (obj, flipX, flipY) => {
|
|
11676
|
+
if (!isBitmapLikeFabricObject(obj)) return;
|
|
11677
|
+
const sx = Math.abs(Number(obj.scaleX ?? 1)) || 1;
|
|
11678
|
+
const sy = Math.abs(Number(obj.scaleY ?? 1)) || 1;
|
|
11679
|
+
obj.set({ scaleX: sx, scaleY: sy, flipX, flipY });
|
|
11680
|
+
obj.setCoords();
|
|
11681
|
+
obj.dirty = true;
|
|
11682
|
+
};
|
|
11671
11683
|
const toggleLogicalFlipInMatrix = (matrix, flipX, flipY) => {
|
|
11672
11684
|
if (!flipX && !flipY) return matrix;
|
|
11673
11685
|
const sx = flipX ? -1 : 1;
|
|
@@ -14637,7 +14649,7 @@ const PageCanvas = forwardRef(
|
|
|
14637
14649
|
fabricCanvas.on("selection:cleared", () => {
|
|
14638
14650
|
});
|
|
14639
14651
|
fabricCanvas.on("object:scaling", (e) => {
|
|
14640
|
-
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
14652
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
14641
14653
|
if (!isActiveRef.current) return;
|
|
14642
14654
|
const t = e.target;
|
|
14643
14655
|
if (t) lastResizeScaleTargetRef.current = t;
|
|
@@ -14868,20 +14880,91 @@ const PageCanvas = forwardRef(
|
|
|
14868
14880
|
};
|
|
14869
14881
|
}
|
|
14870
14882
|
}
|
|
14871
|
-
if (obj instanceof fabric.ActiveSelection && (corner
|
|
14872
|
-
const isXSide = corner === "ml" || corner === "mr";
|
|
14883
|
+
if (obj instanceof fabric.ActiveSelection && isCornerResizeHandle(corner)) {
|
|
14873
14884
|
const _cur = fabricCanvas._currentTransform;
|
|
14874
14885
|
const startSx = Math.abs(Number(((_g = _cur == null ? void 0 : _cur.original) == null ? void 0 : _g.scaleX) ?? 1)) || 1;
|
|
14875
14886
|
const startSy = Math.abs(Number(((_h = _cur == null ? void 0 : _cur.original) == null ? void 0 : _h.scaleY) ?? 1)) || 1;
|
|
14887
|
+
const liveAsSx = Math.abs((obj.scaleX ?? 1) / startSx) || 1;
|
|
14888
|
+
const liveAsSy = Math.abs((obj.scaleY ?? 1) / startSy) || 1;
|
|
14889
|
+
const uniform = Math.max(1e-3, Math.sqrt(liveAsSx * liveAsSy));
|
|
14890
|
+
for (const child of obj.getObjects()) {
|
|
14891
|
+
if (!isBitmapLikeFabricObject(child)) continue;
|
|
14892
|
+
const liveGestureKey = `${obj.__pixldocsGroupSelection ?? "selection"}:${corner}:${((_i = groupSelectionTransformStartRef.current) == null ? void 0 : _i.selectionLeft) ?? obj.left ?? 0}:${((_j = groupSelectionTransformStartRef.current) == null ? void 0 : _j.selectionTop) ?? obj.top ?? 0}`;
|
|
14893
|
+
if (child.__asLiveGestureKey !== liveGestureKey) {
|
|
14894
|
+
child.__asLiveGestureKey = liveGestureKey;
|
|
14895
|
+
child.__asLiveOrigAngle = Number.isFinite(child.angle) ? child.angle ?? 0 : 0;
|
|
14896
|
+
child.__asLiveOrigFlipX = !!child.flipX;
|
|
14897
|
+
child.__asLiveOrigFlipY = !!child.flipY;
|
|
14898
|
+
child.__asLiveOrigScaleX = Math.abs(Number(child.scaleX ?? 1)) || 1;
|
|
14899
|
+
child.__asLiveOrigScaleY = Math.abs(Number(child.scaleY ?? 1)) || 1;
|
|
14900
|
+
}
|
|
14901
|
+
const childAngleDeg = child.__asLiveOrigAngle ?? (child.angle ?? 0);
|
|
14902
|
+
const origScaleX = child.__asLiveOrigScaleX;
|
|
14903
|
+
const origScaleY = child.__asLiveOrigScaleY;
|
|
14904
|
+
const baseW = Math.max(1, Number(((_k = child.__cropData) == null ? void 0 : _k.frameW) ?? child.width ?? 1));
|
|
14905
|
+
const baseH = Math.max(1, Number(((_l = child.__cropData) == null ? void 0 : _l.frameH) ?? child.height ?? 1));
|
|
14906
|
+
try {
|
|
14907
|
+
const inv = [1 / liveAsSx, 0, 0, 1 / liveAsSy, 0, 0];
|
|
14908
|
+
const Rtheta = fabric.util.composeMatrix({ angle: childAngleDeg, scaleX: 1, scaleY: 1, translateX: 0, translateY: 0 });
|
|
14909
|
+
const Uscale = fabric.util.composeMatrix({ angle: 0, scaleX: origScaleX * uniform, scaleY: origScaleY * uniform, translateX: 0, translateY: 0 });
|
|
14910
|
+
const M = fabric.util.multiplyTransformMatrices(
|
|
14911
|
+
fabric.util.multiplyTransformMatrices(inv, Rtheta),
|
|
14912
|
+
Uscale
|
|
14913
|
+
);
|
|
14914
|
+
const dec = fabric.util.qrDecompose(M);
|
|
14915
|
+
child._set("angle", dec.angle);
|
|
14916
|
+
child._set("scaleX", dec.scaleX);
|
|
14917
|
+
child._set("scaleY", dec.scaleY);
|
|
14918
|
+
child._set("skewX", dec.skewX);
|
|
14919
|
+
child._set("skewY", dec.skewY);
|
|
14920
|
+
child._set("flipX", !!(child.__asLiveOrigFlipX ?? child.flipX));
|
|
14921
|
+
child._set("flipY", !!(child.__asLiveOrigFlipY ?? child.flipY));
|
|
14922
|
+
const worldMatrix = fabric.util.multiplyTransformMatrices(
|
|
14923
|
+
obj.calcTransformMatrix(),
|
|
14924
|
+
child.calcOwnMatrix()
|
|
14925
|
+
);
|
|
14926
|
+
const live = fabric.util.qrDecompose(worldMatrix);
|
|
14927
|
+
child.__asLiveWorldAngle = (obj.angle ?? 0) + childAngleDeg;
|
|
14928
|
+
child.__asLiveWorldCenterX = live.translateX;
|
|
14929
|
+
child.__asLiveWorldCenterY = live.translateY;
|
|
14930
|
+
child.__asLiveFinalW = baseW * origScaleX * uniform;
|
|
14931
|
+
child.__asLiveFinalH = baseH * origScaleY * uniform;
|
|
14932
|
+
} catch {
|
|
14933
|
+
}
|
|
14934
|
+
child.setCoords();
|
|
14935
|
+
child.dirty = true;
|
|
14936
|
+
}
|
|
14937
|
+
}
|
|
14938
|
+
if (obj instanceof fabric.ActiveSelection && (corner === "ml" || corner === "mr" || corner === "mt" || corner === "mb")) {
|
|
14939
|
+
const isXSide = corner === "ml" || corner === "mr";
|
|
14940
|
+
const _cur = fabricCanvas._currentTransform;
|
|
14941
|
+
const startSx = Math.abs(Number(((_m = _cur == null ? void 0 : _cur.original) == null ? void 0 : _m.scaleX) ?? 1)) || 1;
|
|
14942
|
+
const startSy = Math.abs(Number(((_n = _cur == null ? void 0 : _cur.original) == null ? void 0 : _n.scaleY) ?? 1)) || 1;
|
|
14876
14943
|
const sAxis = isXSide ? Math.abs((obj.scaleX ?? 1) / startSx) : Math.abs((obj.scaleY ?? 1) / startSy);
|
|
14877
14944
|
if (sAxis > 1e-3) {
|
|
14878
|
-
|
|
14945
|
+
const captureAsLiveWorldSnapshot = (childObj, liveW, liveH) => {
|
|
14946
|
+
try {
|
|
14947
|
+
const selectionMatrix = obj.calcTransformMatrix();
|
|
14948
|
+
const childMatrix = childObj.calcOwnMatrix();
|
|
14949
|
+
const worldMatrix = fabric.util.multiplyTransformMatrices(selectionMatrix, childMatrix);
|
|
14950
|
+
const live = fabric.util.qrDecompose(worldMatrix);
|
|
14951
|
+
const childOrigLocalAngle = Number.isFinite(childObj.__asLiveOrigAngle) ? childObj.__asLiveOrigAngle : childObj.angle ?? 0;
|
|
14952
|
+
childObj.__asLiveWorldAngle = (obj.angle ?? 0) + childOrigLocalAngle;
|
|
14953
|
+
childObj.__asLiveWorldCenterX = live.translateX;
|
|
14954
|
+
childObj.__asLiveWorldCenterY = live.translateY;
|
|
14955
|
+
childObj.__asLiveParentWorldAngle = obj.angle ?? 0;
|
|
14956
|
+
if (Number.isFinite(liveW)) childObj.__asLiveFinalW = liveW;
|
|
14957
|
+
if (Number.isFinite(liveH)) childObj.__asLiveFinalH = liveH;
|
|
14958
|
+
} catch {
|
|
14959
|
+
}
|
|
14960
|
+
};
|
|
14961
|
+
if (isXSide && ((_o = groupShiftReflowSnapshotRef.current) == null ? void 0 : _o.selection) !== obj) {
|
|
14879
14962
|
groupShiftReflowSnapshotRef.current = null;
|
|
14880
14963
|
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
14881
14964
|
if (logicalGroupId) {
|
|
14882
14965
|
try {
|
|
14883
14966
|
const state = useEditorStore.getState();
|
|
14884
|
-
const pageChildren2 = ((
|
|
14967
|
+
const pageChildren2 = ((_p = state.canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _p.children) ?? [];
|
|
14885
14968
|
const groupNode = findNodeById(pageChildren2, logicalGroupId);
|
|
14886
14969
|
if (groupNode && isGroup(groupNode) && !isStackLayoutMode(groupNode.layoutMode)) {
|
|
14887
14970
|
const entries = obj.getObjects().map((c) => ({
|
|
@@ -14911,17 +14994,49 @@ const PageCanvas = forwardRef(
|
|
|
14911
14994
|
const asRect0 = obj.getBoundingRect();
|
|
14912
14995
|
let didReflowTextChild = false;
|
|
14913
14996
|
for (const child of obj.getObjects()) {
|
|
14914
|
-
const liveGestureKey = `${obj.__pixldocsGroupSelection ?? "selection"}:${corner}:${((
|
|
14997
|
+
const liveGestureKey = `${obj.__pixldocsGroupSelection ?? "selection"}:${corner}:${((_q = groupSelectionTransformStartRef.current) == null ? void 0 : _q.selectionLeft) ?? obj.left ?? 0}:${((_r = groupSelectionTransformStartRef.current) == null ? void 0 : _r.selectionTop) ?? obj.top ?? 0}`;
|
|
14915
14998
|
if (child.__asLiveGestureKey !== liveGestureKey) {
|
|
14916
14999
|
child.__asLiveGestureKey = liveGestureKey;
|
|
14917
15000
|
child.__asLiveOrigAngle = Number.isFinite(child.angle) ? child.angle ?? 0 : 0;
|
|
15001
|
+
child.__asLiveOrigFlipX = !!child.flipX;
|
|
15002
|
+
child.__asLiveOrigFlipY = !!child.flipY;
|
|
14918
15003
|
}
|
|
14919
|
-
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
|
|
15004
|
+
const liveAsSx = isXSide ? sAxis : 1;
|
|
15005
|
+
const liveAsSy = isXSide ? 1 : sAxis;
|
|
15006
|
+
if (child instanceof fabric.Group && (child.__cropGroup || ((_s = child._ct) == null ? void 0 : _s.isCropGroup)) || child instanceof fabric.FabricImage && !child.__cropGroup && !child.smartElementType) {
|
|
15007
|
+
const childAngleDeg2 = child.__asLiveOrigAngle ?? (child.angle ?? 0);
|
|
15008
|
+
const theta2 = fabric.util.degreesToRadians(childAngleDeg2);
|
|
15009
|
+
const cosT2 = Math.cos(theta2);
|
|
15010
|
+
const sinT2 = Math.sin(theta2);
|
|
15011
|
+
const dX = isXSide ? Math.max(1e-3, liveAsSx * cosT2 * cosT2 + sinT2 * sinT2) : 1;
|
|
15012
|
+
const dY = isXSide ? 1 : Math.max(1e-3, liveAsSy * cosT2 * cosT2 + sinT2 * sinT2);
|
|
15013
|
+
if (child.__asLiveOrigScaleX == null) child.__asLiveOrigScaleX = Math.abs(Number(child.scaleX ?? 1)) || 1;
|
|
15014
|
+
if (child.__asLiveOrigScaleY == null) child.__asLiveOrigScaleY = Math.abs(Number(child.scaleY ?? 1)) || 1;
|
|
15015
|
+
const origScaleX = child.__asLiveOrigScaleX;
|
|
15016
|
+
const origScaleY = child.__asLiveOrigScaleY;
|
|
15017
|
+
const baseW = Math.max(1, Number(((_t = child.__cropData) == null ? void 0 : _t.frameW) ?? child.width ?? 1));
|
|
15018
|
+
const baseH = Math.max(1, Number(((_u = child.__cropData) == null ? void 0 : _u.frameH) ?? child.height ?? 1));
|
|
15019
|
+
const liveW = baseW * origScaleX * dX;
|
|
15020
|
+
const liveH = baseH * origScaleY * dY;
|
|
15021
|
+
try {
|
|
15022
|
+
const inv = [1 / liveAsSx, 0, 0, 1 / liveAsSy, 0, 0];
|
|
15023
|
+
const Rtheta = fabric.util.composeMatrix({ angle: childAngleDeg2, scaleX: 1, scaleY: 1, translateX: 0, translateY: 0 });
|
|
15024
|
+
const Dscale = fabric.util.composeMatrix({ angle: 0, scaleX: origScaleX * dX, scaleY: origScaleY * dY, translateX: 0, translateY: 0 });
|
|
15025
|
+
const M = fabric.util.multiplyTransformMatrices(
|
|
15026
|
+
fabric.util.multiplyTransformMatrices(inv, Rtheta),
|
|
15027
|
+
Dscale
|
|
15028
|
+
);
|
|
15029
|
+
const dec = fabric.util.qrDecompose(M);
|
|
15030
|
+
child._set("angle", dec.angle);
|
|
15031
|
+
child._set("scaleX", dec.scaleX);
|
|
15032
|
+
child._set("scaleY", dec.scaleY);
|
|
15033
|
+
child._set("skewX", dec.skewX);
|
|
15034
|
+
child._set("skewY", dec.skewY);
|
|
15035
|
+
child._set("flipX", !!(child.__asLiveOrigFlipX ?? child.flipX));
|
|
15036
|
+
child._set("flipY", !!(child.__asLiveOrigFlipY ?? child.flipY));
|
|
15037
|
+
} catch {
|
|
15038
|
+
}
|
|
15039
|
+
captureAsLiveWorldSnapshot(child, liveW, liveH);
|
|
14925
15040
|
child.setCoords();
|
|
14926
15041
|
child.dirty = true;
|
|
14927
15042
|
continue;
|
|
@@ -14979,7 +15094,7 @@ const PageCanvas = forwardRef(
|
|
|
14979
15094
|
child.dirty = true;
|
|
14980
15095
|
didReflowTextChild = true;
|
|
14981
15096
|
}
|
|
14982
|
-
if (isXSide && ((
|
|
15097
|
+
if (isXSide && ((_v = groupShiftReflowSnapshotRef.current) == null ? void 0 : _v.selection) === obj) {
|
|
14983
15098
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
14984
15099
|
const anchorEntry = snap.children[0];
|
|
14985
15100
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
@@ -15141,7 +15256,7 @@ const PageCanvas = forwardRef(
|
|
|
15141
15256
|
setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
|
|
15142
15257
|
if (drilledGroupIdRef.current) {
|
|
15143
15258
|
try {
|
|
15144
|
-
(
|
|
15259
|
+
(_w = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _w.call(fabricCanvas);
|
|
15145
15260
|
} catch {
|
|
15146
15261
|
}
|
|
15147
15262
|
}
|
|
@@ -15368,6 +15483,8 @@ const PageCanvas = forwardRef(
|
|
|
15368
15483
|
for (const child of t.getObjects()) {
|
|
15369
15484
|
delete child.__asLiveOrigW;
|
|
15370
15485
|
delete child.__asLiveOrigH;
|
|
15486
|
+
delete child.__asLiveOrigScaleX;
|
|
15487
|
+
delete child.__asLiveOrigScaleY;
|
|
15371
15488
|
delete child.__asLiveRotSnap;
|
|
15372
15489
|
delete child.__asLiveGestureKey;
|
|
15373
15490
|
}
|
|
@@ -16070,10 +16187,12 @@ const PageCanvas = forwardRef(
|
|
|
16070
16187
|
const ownSy = Math.abs(obj.scaleY ?? 1);
|
|
16071
16188
|
const bakedW = Math.max(1, intrinsicWidth * ownSx * (imgIsXSide ? sLocalI : 1));
|
|
16072
16189
|
const bakedH = Math.max(1, intrinsicHeight * ownSy * (imgIsXSide ? 1 : sLocalI));
|
|
16190
|
+
const cleanW = Math.max(1, Number(obj.__asLiveFinalW ?? bakedW));
|
|
16191
|
+
const cleanH = Math.max(1, Number(obj.__asLiveFinalH ?? bakedH));
|
|
16073
16192
|
try {
|
|
16074
16193
|
obj.set({
|
|
16075
|
-
width:
|
|
16076
|
-
height:
|
|
16194
|
+
width: cleanW,
|
|
16195
|
+
height: cleanH,
|
|
16077
16196
|
scaleX: 1,
|
|
16078
16197
|
scaleY: 1,
|
|
16079
16198
|
skewX: 0,
|
|
@@ -16092,8 +16211,8 @@ const PageCanvas = forwardRef(
|
|
|
16092
16211
|
obj.setCoords();
|
|
16093
16212
|
} catch {
|
|
16094
16213
|
}
|
|
16095
|
-
finalWidth =
|
|
16096
|
-
finalHeight =
|
|
16214
|
+
finalWidth = cleanW;
|
|
16215
|
+
finalHeight = cleanH;
|
|
16097
16216
|
finalScaleX = 1;
|
|
16098
16217
|
finalScaleY = 1;
|
|
16099
16218
|
const worldCx = Number.isFinite(obj.__asLiveWorldCenterX) ? obj.__asLiveWorldCenterX : decomposed.translateX ?? 0;
|
|
@@ -16385,7 +16504,13 @@ const PageCanvas = forwardRef(
|
|
|
16385
16504
|
const cleanTransformMatrix = toggleLogicalFlipInMatrix(normalizedFinalAbsoluteMatrix, persistedFlipX, persistedFlipY);
|
|
16386
16505
|
const persistedDecomposed = fabric.util.qrDecompose(cleanTransformMatrix);
|
|
16387
16506
|
if (isActiveSelection && (obj instanceof fabric.FabricImage || obj instanceof fabric.Group && obj.__cropGroup)) {
|
|
16388
|
-
activeSelectionFlipRestores.push({
|
|
16507
|
+
activeSelectionFlipRestores.push({
|
|
16508
|
+
obj,
|
|
16509
|
+
flipX: persistedFlipX,
|
|
16510
|
+
flipY: persistedFlipY,
|
|
16511
|
+
localAngle: Number.isFinite(obj.angle) ? obj.angle ?? 0 : persistedAngle,
|
|
16512
|
+
worldAngle: persistedAngle
|
|
16513
|
+
});
|
|
16389
16514
|
}
|
|
16390
16515
|
const elementUpdate = {
|
|
16391
16516
|
left: storePos.left,
|
|
@@ -16466,7 +16591,7 @@ const PageCanvas = forwardRef(
|
|
|
16466
16591
|
}
|
|
16467
16592
|
const isCropGroupObj = obj instanceof fabric.Group && obj.__cropGroup;
|
|
16468
16593
|
const isPlainImageObj = obj instanceof fabric.FabricImage && !obj.__cropGroup && !obj.smartElementType;
|
|
16469
|
-
if (isActiveSelection &&
|
|
16594
|
+
if (isActiveSelection && isActiveSelectionResizeGesture && (isCropGroupObj || isPlainImageObj)) {
|
|
16470
16595
|
const childLocalAngleSrc = obj.__asLiveOrigAngle != null ? obj.__asLiveOrigAngle : Number.isFinite(sourceElement == null ? void 0 : sourceElement.angle) ? sourceElement.angle ?? 0 : obj.angle ?? 0;
|
|
16471
16596
|
const normAng = (childLocalAngleSrc % 360 + 360) % 360;
|
|
16472
16597
|
const isRotatedImg = Math.min(normAng, 360 - normAng) > 0.5;
|
|
@@ -16515,6 +16640,12 @@ const PageCanvas = forwardRef(
|
|
|
16515
16640
|
objectBeforeStoreWrite: summarizeFabricObjectForResizeDebug(obj)
|
|
16516
16641
|
});
|
|
16517
16642
|
}
|
|
16643
|
+
if (isActiveSelection && (obj instanceof fabric.FabricImage || obj instanceof fabric.Group && obj.__cropGroup)) {
|
|
16644
|
+
const restore = activeSelectionFlipRestores.find((entry) => entry.obj === obj);
|
|
16645
|
+
if (restore) {
|
|
16646
|
+
restore.worldAngle = Number.isFinite(elementUpdate.angle) ? elementUpdate.angle : persistedAngle;
|
|
16647
|
+
}
|
|
16648
|
+
}
|
|
16518
16649
|
if (isActiveSelection) {
|
|
16519
16650
|
logRotGroupImageDrift("store-update-child", {
|
|
16520
16651
|
time: Math.round(performance.now()),
|
|
@@ -16611,14 +16742,14 @@ const PageCanvas = forwardRef(
|
|
|
16611
16742
|
skipActiveSelectionBakeOnClearRef.current = true;
|
|
16612
16743
|
try {
|
|
16613
16744
|
for (const restore of activeSelectionFlipRestores) {
|
|
16614
|
-
|
|
16745
|
+
restorePersistedFlipFlagsOnly(restore.obj, restore.flipX, restore.flipY);
|
|
16615
16746
|
}
|
|
16616
16747
|
fabricCanvas.discardActiveObject();
|
|
16617
16748
|
} finally {
|
|
16618
16749
|
skipActiveSelectionBakeOnClearRef.current = false;
|
|
16619
16750
|
}
|
|
16620
16751
|
for (const restore of activeSelectionFlipRestores) {
|
|
16621
|
-
restorePersistedFlipState(restore.obj, restore.flipX, restore.flipY
|
|
16752
|
+
restorePersistedFlipState(restore.obj, restore.flipX, restore.flipY);
|
|
16622
16753
|
}
|
|
16623
16754
|
for (const bake of pendingCropGroupFrameBakes) {
|
|
16624
16755
|
const ct = bake.obj.__cropData;
|
|
@@ -16640,7 +16771,7 @@ const PageCanvas = forwardRef(
|
|
|
16640
16771
|
bake.obj.setCoords();
|
|
16641
16772
|
}
|
|
16642
16773
|
for (const restore of activeSelectionFlipRestores) {
|
|
16643
|
-
restorePersistedFlipState(restore.obj, restore.flipX, restore.flipY
|
|
16774
|
+
restorePersistedFlipState(restore.obj, restore.flipX, restore.flipY);
|
|
16644
16775
|
}
|
|
16645
16776
|
if (membersToReselect.length > 1) {
|
|
16646
16777
|
const newSel = new fabric.ActiveSelection(membersToReselect, { canvas: fabricCanvas });
|
|
@@ -16699,6 +16830,10 @@ const PageCanvas = forwardRef(
|
|
|
16699
16830
|
if (t instanceof fabric.ActiveSelection) {
|
|
16700
16831
|
for (const child of t.getObjects()) {
|
|
16701
16832
|
delete child.__asLiveOrigAngle;
|
|
16833
|
+
delete child.__asLiveOrigFlipX;
|
|
16834
|
+
delete child.__asLiveOrigFlipY;
|
|
16835
|
+
delete child.__asLiveOrigScaleX;
|
|
16836
|
+
delete child.__asLiveOrigScaleY;
|
|
16702
16837
|
delete child.__asLiveGestureKey;
|
|
16703
16838
|
delete child.__asLiveWorldAngle;
|
|
16704
16839
|
delete child.__asLiveWorldCenterX;
|
|
@@ -25809,9 +25944,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
25809
25944
|
}
|
|
25810
25945
|
return svgString;
|
|
25811
25946
|
}
|
|
25812
|
-
const resolvedPackageVersion = "0.5.
|
|
25947
|
+
const resolvedPackageVersion = "0.5.448";
|
|
25813
25948
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
25814
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
25949
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.448";
|
|
25815
25950
|
const roundParityValue = (value) => {
|
|
25816
25951
|
if (typeof value !== "number") return value;
|
|
25817
25952
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -26625,7 +26760,7 @@ class PixldocsRenderer {
|
|
|
26625
26760
|
await this.waitForCanvasScene(container, cloned, i);
|
|
26626
26761
|
}
|
|
26627
26762
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
26628
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
26763
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-T3FZHnkS.js");
|
|
26629
26764
|
const prepared = preparePagesForExport(
|
|
26630
26765
|
cloned.pages,
|
|
26631
26766
|
canvasWidth,
|
|
@@ -28945,7 +29080,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
28945
29080
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
28946
29081
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
28947
29082
|
try {
|
|
28948
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
29083
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-T3FZHnkS.js");
|
|
28949
29084
|
try {
|
|
28950
29085
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
28951
29086
|
} catch {
|
|
@@ -29345,4 +29480,4 @@ export {
|
|
|
29345
29480
|
buildTeaserBlurFlatKeys as y,
|
|
29346
29481
|
collectFontDescriptorsFromConfig as z
|
|
29347
29482
|
};
|
|
29348
|
-
//# sourceMappingURL=index-
|
|
29483
|
+
//# sourceMappingURL=index-BruY5wZV.js.map
|