@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
|
@@ -11686,6 +11686,18 @@ const restorePersistedFlipState = (obj, flipX, flipY, angle) => {
|
|
|
11686
11686
|
obj.setCoords();
|
|
11687
11687
|
obj.dirty = true;
|
|
11688
11688
|
};
|
|
11689
|
+
const isBitmapLikeFabricObject = (obj) => {
|
|
11690
|
+
var _a2;
|
|
11691
|
+
return obj instanceof fabric__namespace.FabricImage || obj instanceof fabric__namespace.Group && !!(obj.__cropGroup || ((_a2 = obj._ct) == null ? void 0 : _a2.isCropGroup));
|
|
11692
|
+
};
|
|
11693
|
+
const restorePersistedFlipFlagsOnly = (obj, flipX, flipY) => {
|
|
11694
|
+
if (!isBitmapLikeFabricObject(obj)) return;
|
|
11695
|
+
const sx = Math.abs(Number(obj.scaleX ?? 1)) || 1;
|
|
11696
|
+
const sy = Math.abs(Number(obj.scaleY ?? 1)) || 1;
|
|
11697
|
+
obj.set({ scaleX: sx, scaleY: sy, flipX, flipY });
|
|
11698
|
+
obj.setCoords();
|
|
11699
|
+
obj.dirty = true;
|
|
11700
|
+
};
|
|
11689
11701
|
const toggleLogicalFlipInMatrix = (matrix, flipX, flipY) => {
|
|
11690
11702
|
if (!flipX && !flipY) return matrix;
|
|
11691
11703
|
const sx = flipX ? -1 : 1;
|
|
@@ -14655,7 +14667,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14655
14667
|
fabricCanvas.on("selection:cleared", () => {
|
|
14656
14668
|
});
|
|
14657
14669
|
fabricCanvas.on("object:scaling", (e) => {
|
|
14658
|
-
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
14670
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
14659
14671
|
if (!isActiveRef.current) return;
|
|
14660
14672
|
const t = e.target;
|
|
14661
14673
|
if (t) lastResizeScaleTargetRef.current = t;
|
|
@@ -14886,20 +14898,91 @@ const PageCanvas = react.forwardRef(
|
|
|
14886
14898
|
};
|
|
14887
14899
|
}
|
|
14888
14900
|
}
|
|
14889
|
-
if (obj instanceof fabric__namespace.ActiveSelection && (corner
|
|
14890
|
-
const isXSide = corner === "ml" || corner === "mr";
|
|
14901
|
+
if (obj instanceof fabric__namespace.ActiveSelection && isCornerResizeHandle(corner)) {
|
|
14891
14902
|
const _cur = fabricCanvas._currentTransform;
|
|
14892
14903
|
const startSx = Math.abs(Number(((_g = _cur == null ? void 0 : _cur.original) == null ? void 0 : _g.scaleX) ?? 1)) || 1;
|
|
14893
14904
|
const startSy = Math.abs(Number(((_h = _cur == null ? void 0 : _cur.original) == null ? void 0 : _h.scaleY) ?? 1)) || 1;
|
|
14905
|
+
const liveAsSx = Math.abs((obj.scaleX ?? 1) / startSx) || 1;
|
|
14906
|
+
const liveAsSy = Math.abs((obj.scaleY ?? 1) / startSy) || 1;
|
|
14907
|
+
const uniform = Math.max(1e-3, Math.sqrt(liveAsSx * liveAsSy));
|
|
14908
|
+
for (const child of obj.getObjects()) {
|
|
14909
|
+
if (!isBitmapLikeFabricObject(child)) continue;
|
|
14910
|
+
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}`;
|
|
14911
|
+
if (child.__asLiveGestureKey !== liveGestureKey) {
|
|
14912
|
+
child.__asLiveGestureKey = liveGestureKey;
|
|
14913
|
+
child.__asLiveOrigAngle = Number.isFinite(child.angle) ? child.angle ?? 0 : 0;
|
|
14914
|
+
child.__asLiveOrigFlipX = !!child.flipX;
|
|
14915
|
+
child.__asLiveOrigFlipY = !!child.flipY;
|
|
14916
|
+
child.__asLiveOrigScaleX = Math.abs(Number(child.scaleX ?? 1)) || 1;
|
|
14917
|
+
child.__asLiveOrigScaleY = Math.abs(Number(child.scaleY ?? 1)) || 1;
|
|
14918
|
+
}
|
|
14919
|
+
const childAngleDeg = child.__asLiveOrigAngle ?? (child.angle ?? 0);
|
|
14920
|
+
const origScaleX = child.__asLiveOrigScaleX;
|
|
14921
|
+
const origScaleY = child.__asLiveOrigScaleY;
|
|
14922
|
+
const baseW = Math.max(1, Number(((_k = child.__cropData) == null ? void 0 : _k.frameW) ?? child.width ?? 1));
|
|
14923
|
+
const baseH = Math.max(1, Number(((_l = child.__cropData) == null ? void 0 : _l.frameH) ?? child.height ?? 1));
|
|
14924
|
+
try {
|
|
14925
|
+
const inv = [1 / liveAsSx, 0, 0, 1 / liveAsSy, 0, 0];
|
|
14926
|
+
const Rtheta = fabric__namespace.util.composeMatrix({ angle: childAngleDeg, scaleX: 1, scaleY: 1, translateX: 0, translateY: 0 });
|
|
14927
|
+
const Uscale = fabric__namespace.util.composeMatrix({ angle: 0, scaleX: origScaleX * uniform, scaleY: origScaleY * uniform, translateX: 0, translateY: 0 });
|
|
14928
|
+
const M = fabric__namespace.util.multiplyTransformMatrices(
|
|
14929
|
+
fabric__namespace.util.multiplyTransformMatrices(inv, Rtheta),
|
|
14930
|
+
Uscale
|
|
14931
|
+
);
|
|
14932
|
+
const dec = fabric__namespace.util.qrDecompose(M);
|
|
14933
|
+
child._set("angle", dec.angle);
|
|
14934
|
+
child._set("scaleX", dec.scaleX);
|
|
14935
|
+
child._set("scaleY", dec.scaleY);
|
|
14936
|
+
child._set("skewX", dec.skewX);
|
|
14937
|
+
child._set("skewY", dec.skewY);
|
|
14938
|
+
child._set("flipX", !!(child.__asLiveOrigFlipX ?? child.flipX));
|
|
14939
|
+
child._set("flipY", !!(child.__asLiveOrigFlipY ?? child.flipY));
|
|
14940
|
+
const worldMatrix = fabric__namespace.util.multiplyTransformMatrices(
|
|
14941
|
+
obj.calcTransformMatrix(),
|
|
14942
|
+
child.calcOwnMatrix()
|
|
14943
|
+
);
|
|
14944
|
+
const live = fabric__namespace.util.qrDecompose(worldMatrix);
|
|
14945
|
+
child.__asLiveWorldAngle = (obj.angle ?? 0) + childAngleDeg;
|
|
14946
|
+
child.__asLiveWorldCenterX = live.translateX;
|
|
14947
|
+
child.__asLiveWorldCenterY = live.translateY;
|
|
14948
|
+
child.__asLiveFinalW = baseW * origScaleX * uniform;
|
|
14949
|
+
child.__asLiveFinalH = baseH * origScaleY * uniform;
|
|
14950
|
+
} catch {
|
|
14951
|
+
}
|
|
14952
|
+
child.setCoords();
|
|
14953
|
+
child.dirty = true;
|
|
14954
|
+
}
|
|
14955
|
+
}
|
|
14956
|
+
if (obj instanceof fabric__namespace.ActiveSelection && (corner === "ml" || corner === "mr" || corner === "mt" || corner === "mb")) {
|
|
14957
|
+
const isXSide = corner === "ml" || corner === "mr";
|
|
14958
|
+
const _cur = fabricCanvas._currentTransform;
|
|
14959
|
+
const startSx = Math.abs(Number(((_m = _cur == null ? void 0 : _cur.original) == null ? void 0 : _m.scaleX) ?? 1)) || 1;
|
|
14960
|
+
const startSy = Math.abs(Number(((_n = _cur == null ? void 0 : _cur.original) == null ? void 0 : _n.scaleY) ?? 1)) || 1;
|
|
14894
14961
|
const sAxis = isXSide ? Math.abs((obj.scaleX ?? 1) / startSx) : Math.abs((obj.scaleY ?? 1) / startSy);
|
|
14895
14962
|
if (sAxis > 1e-3) {
|
|
14896
|
-
|
|
14963
|
+
const captureAsLiveWorldSnapshot = (childObj, liveW, liveH) => {
|
|
14964
|
+
try {
|
|
14965
|
+
const selectionMatrix = obj.calcTransformMatrix();
|
|
14966
|
+
const childMatrix = childObj.calcOwnMatrix();
|
|
14967
|
+
const worldMatrix = fabric__namespace.util.multiplyTransformMatrices(selectionMatrix, childMatrix);
|
|
14968
|
+
const live = fabric__namespace.util.qrDecompose(worldMatrix);
|
|
14969
|
+
const childOrigLocalAngle = Number.isFinite(childObj.__asLiveOrigAngle) ? childObj.__asLiveOrigAngle : childObj.angle ?? 0;
|
|
14970
|
+
childObj.__asLiveWorldAngle = (obj.angle ?? 0) + childOrigLocalAngle;
|
|
14971
|
+
childObj.__asLiveWorldCenterX = live.translateX;
|
|
14972
|
+
childObj.__asLiveWorldCenterY = live.translateY;
|
|
14973
|
+
childObj.__asLiveParentWorldAngle = obj.angle ?? 0;
|
|
14974
|
+
if (Number.isFinite(liveW)) childObj.__asLiveFinalW = liveW;
|
|
14975
|
+
if (Number.isFinite(liveH)) childObj.__asLiveFinalH = liveH;
|
|
14976
|
+
} catch {
|
|
14977
|
+
}
|
|
14978
|
+
};
|
|
14979
|
+
if (isXSide && ((_o = groupShiftReflowSnapshotRef.current) == null ? void 0 : _o.selection) !== obj) {
|
|
14897
14980
|
groupShiftReflowSnapshotRef.current = null;
|
|
14898
14981
|
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
14899
14982
|
if (logicalGroupId) {
|
|
14900
14983
|
try {
|
|
14901
14984
|
const state = useEditorStore.getState();
|
|
14902
|
-
const pageChildren2 = ((
|
|
14985
|
+
const pageChildren2 = ((_p = state.canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _p.children) ?? [];
|
|
14903
14986
|
const groupNode = findNodeById(pageChildren2, logicalGroupId);
|
|
14904
14987
|
if (groupNode && isGroup(groupNode) && !isStackLayoutMode(groupNode.layoutMode)) {
|
|
14905
14988
|
const entries = obj.getObjects().map((c) => ({
|
|
@@ -14929,17 +15012,49 @@ const PageCanvas = react.forwardRef(
|
|
|
14929
15012
|
const asRect0 = obj.getBoundingRect();
|
|
14930
15013
|
let didReflowTextChild = false;
|
|
14931
15014
|
for (const child of obj.getObjects()) {
|
|
14932
|
-
const liveGestureKey = `${obj.__pixldocsGroupSelection ?? "selection"}:${corner}:${((
|
|
15015
|
+
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}`;
|
|
14933
15016
|
if (child.__asLiveGestureKey !== liveGestureKey) {
|
|
14934
15017
|
child.__asLiveGestureKey = liveGestureKey;
|
|
14935
15018
|
child.__asLiveOrigAngle = Number.isFinite(child.angle) ? child.angle ?? 0 : 0;
|
|
15019
|
+
child.__asLiveOrigFlipX = !!child.flipX;
|
|
15020
|
+
child.__asLiveOrigFlipY = !!child.flipY;
|
|
14936
15021
|
}
|
|
14937
|
-
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
|
|
15022
|
+
const liveAsSx = isXSide ? sAxis : 1;
|
|
15023
|
+
const liveAsSy = isXSide ? 1 : sAxis;
|
|
15024
|
+
if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_s = child._ct) == null ? void 0 : _s.isCropGroup)) || child instanceof fabric__namespace.FabricImage && !child.__cropGroup && !child.smartElementType) {
|
|
15025
|
+
const childAngleDeg2 = child.__asLiveOrigAngle ?? (child.angle ?? 0);
|
|
15026
|
+
const theta2 = fabric__namespace.util.degreesToRadians(childAngleDeg2);
|
|
15027
|
+
const cosT2 = Math.cos(theta2);
|
|
15028
|
+
const sinT2 = Math.sin(theta2);
|
|
15029
|
+
const dX = isXSide ? Math.max(1e-3, liveAsSx * cosT2 * cosT2 + sinT2 * sinT2) : 1;
|
|
15030
|
+
const dY = isXSide ? 1 : Math.max(1e-3, liveAsSy * cosT2 * cosT2 + sinT2 * sinT2);
|
|
15031
|
+
if (child.__asLiveOrigScaleX == null) child.__asLiveOrigScaleX = Math.abs(Number(child.scaleX ?? 1)) || 1;
|
|
15032
|
+
if (child.__asLiveOrigScaleY == null) child.__asLiveOrigScaleY = Math.abs(Number(child.scaleY ?? 1)) || 1;
|
|
15033
|
+
const origScaleX = child.__asLiveOrigScaleX;
|
|
15034
|
+
const origScaleY = child.__asLiveOrigScaleY;
|
|
15035
|
+
const baseW = Math.max(1, Number(((_t = child.__cropData) == null ? void 0 : _t.frameW) ?? child.width ?? 1));
|
|
15036
|
+
const baseH = Math.max(1, Number(((_u = child.__cropData) == null ? void 0 : _u.frameH) ?? child.height ?? 1));
|
|
15037
|
+
const liveW = baseW * origScaleX * dX;
|
|
15038
|
+
const liveH = baseH * origScaleY * dY;
|
|
15039
|
+
try {
|
|
15040
|
+
const inv = [1 / liveAsSx, 0, 0, 1 / liveAsSy, 0, 0];
|
|
15041
|
+
const Rtheta = fabric__namespace.util.composeMatrix({ angle: childAngleDeg2, scaleX: 1, scaleY: 1, translateX: 0, translateY: 0 });
|
|
15042
|
+
const Dscale = fabric__namespace.util.composeMatrix({ angle: 0, scaleX: origScaleX * dX, scaleY: origScaleY * dY, translateX: 0, translateY: 0 });
|
|
15043
|
+
const M = fabric__namespace.util.multiplyTransformMatrices(
|
|
15044
|
+
fabric__namespace.util.multiplyTransformMatrices(inv, Rtheta),
|
|
15045
|
+
Dscale
|
|
15046
|
+
);
|
|
15047
|
+
const dec = fabric__namespace.util.qrDecompose(M);
|
|
15048
|
+
child._set("angle", dec.angle);
|
|
15049
|
+
child._set("scaleX", dec.scaleX);
|
|
15050
|
+
child._set("scaleY", dec.scaleY);
|
|
15051
|
+
child._set("skewX", dec.skewX);
|
|
15052
|
+
child._set("skewY", dec.skewY);
|
|
15053
|
+
child._set("flipX", !!(child.__asLiveOrigFlipX ?? child.flipX));
|
|
15054
|
+
child._set("flipY", !!(child.__asLiveOrigFlipY ?? child.flipY));
|
|
15055
|
+
} catch {
|
|
15056
|
+
}
|
|
15057
|
+
captureAsLiveWorldSnapshot(child, liveW, liveH);
|
|
14943
15058
|
child.setCoords();
|
|
14944
15059
|
child.dirty = true;
|
|
14945
15060
|
continue;
|
|
@@ -14997,7 +15112,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14997
15112
|
child.dirty = true;
|
|
14998
15113
|
didReflowTextChild = true;
|
|
14999
15114
|
}
|
|
15000
|
-
if (isXSide && ((
|
|
15115
|
+
if (isXSide && ((_v = groupShiftReflowSnapshotRef.current) == null ? void 0 : _v.selection) === obj) {
|
|
15001
15116
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
15002
15117
|
const anchorEntry = snap.children[0];
|
|
15003
15118
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
@@ -15159,7 +15274,7 @@ const PageCanvas = react.forwardRef(
|
|
|
15159
15274
|
setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
|
|
15160
15275
|
if (drilledGroupIdRef.current) {
|
|
15161
15276
|
try {
|
|
15162
|
-
(
|
|
15277
|
+
(_w = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _w.call(fabricCanvas);
|
|
15163
15278
|
} catch {
|
|
15164
15279
|
}
|
|
15165
15280
|
}
|
|
@@ -15386,6 +15501,8 @@ const PageCanvas = react.forwardRef(
|
|
|
15386
15501
|
for (const child of t.getObjects()) {
|
|
15387
15502
|
delete child.__asLiveOrigW;
|
|
15388
15503
|
delete child.__asLiveOrigH;
|
|
15504
|
+
delete child.__asLiveOrigScaleX;
|
|
15505
|
+
delete child.__asLiveOrigScaleY;
|
|
15389
15506
|
delete child.__asLiveRotSnap;
|
|
15390
15507
|
delete child.__asLiveGestureKey;
|
|
15391
15508
|
}
|
|
@@ -16088,10 +16205,12 @@ const PageCanvas = react.forwardRef(
|
|
|
16088
16205
|
const ownSy = Math.abs(obj.scaleY ?? 1);
|
|
16089
16206
|
const bakedW = Math.max(1, intrinsicWidth * ownSx * (imgIsXSide ? sLocalI : 1));
|
|
16090
16207
|
const bakedH = Math.max(1, intrinsicHeight * ownSy * (imgIsXSide ? 1 : sLocalI));
|
|
16208
|
+
const cleanW = Math.max(1, Number(obj.__asLiveFinalW ?? bakedW));
|
|
16209
|
+
const cleanH = Math.max(1, Number(obj.__asLiveFinalH ?? bakedH));
|
|
16091
16210
|
try {
|
|
16092
16211
|
obj.set({
|
|
16093
|
-
width:
|
|
16094
|
-
height:
|
|
16212
|
+
width: cleanW,
|
|
16213
|
+
height: cleanH,
|
|
16095
16214
|
scaleX: 1,
|
|
16096
16215
|
scaleY: 1,
|
|
16097
16216
|
skewX: 0,
|
|
@@ -16110,8 +16229,8 @@ const PageCanvas = react.forwardRef(
|
|
|
16110
16229
|
obj.setCoords();
|
|
16111
16230
|
} catch {
|
|
16112
16231
|
}
|
|
16113
|
-
finalWidth =
|
|
16114
|
-
finalHeight =
|
|
16232
|
+
finalWidth = cleanW;
|
|
16233
|
+
finalHeight = cleanH;
|
|
16115
16234
|
finalScaleX = 1;
|
|
16116
16235
|
finalScaleY = 1;
|
|
16117
16236
|
const worldCx = Number.isFinite(obj.__asLiveWorldCenterX) ? obj.__asLiveWorldCenterX : decomposed.translateX ?? 0;
|
|
@@ -16403,7 +16522,13 @@ const PageCanvas = react.forwardRef(
|
|
|
16403
16522
|
const cleanTransformMatrix = toggleLogicalFlipInMatrix(normalizedFinalAbsoluteMatrix, persistedFlipX, persistedFlipY);
|
|
16404
16523
|
const persistedDecomposed = fabric__namespace.util.qrDecompose(cleanTransformMatrix);
|
|
16405
16524
|
if (isActiveSelection && (obj instanceof fabric__namespace.FabricImage || obj instanceof fabric__namespace.Group && obj.__cropGroup)) {
|
|
16406
|
-
activeSelectionFlipRestores.push({
|
|
16525
|
+
activeSelectionFlipRestores.push({
|
|
16526
|
+
obj,
|
|
16527
|
+
flipX: persistedFlipX,
|
|
16528
|
+
flipY: persistedFlipY,
|
|
16529
|
+
localAngle: Number.isFinite(obj.angle) ? obj.angle ?? 0 : persistedAngle,
|
|
16530
|
+
worldAngle: persistedAngle
|
|
16531
|
+
});
|
|
16407
16532
|
}
|
|
16408
16533
|
const elementUpdate = {
|
|
16409
16534
|
left: storePos.left,
|
|
@@ -16484,7 +16609,7 @@ const PageCanvas = react.forwardRef(
|
|
|
16484
16609
|
}
|
|
16485
16610
|
const isCropGroupObj = obj instanceof fabric__namespace.Group && obj.__cropGroup;
|
|
16486
16611
|
const isPlainImageObj = obj instanceof fabric__namespace.FabricImage && !obj.__cropGroup && !obj.smartElementType;
|
|
16487
|
-
if (isActiveSelection &&
|
|
16612
|
+
if (isActiveSelection && isActiveSelectionResizeGesture && (isCropGroupObj || isPlainImageObj)) {
|
|
16488
16613
|
const childLocalAngleSrc = obj.__asLiveOrigAngle != null ? obj.__asLiveOrigAngle : Number.isFinite(sourceElement == null ? void 0 : sourceElement.angle) ? sourceElement.angle ?? 0 : obj.angle ?? 0;
|
|
16489
16614
|
const normAng = (childLocalAngleSrc % 360 + 360) % 360;
|
|
16490
16615
|
const isRotatedImg = Math.min(normAng, 360 - normAng) > 0.5;
|
|
@@ -16533,6 +16658,12 @@ const PageCanvas = react.forwardRef(
|
|
|
16533
16658
|
objectBeforeStoreWrite: summarizeFabricObjectForResizeDebug(obj)
|
|
16534
16659
|
});
|
|
16535
16660
|
}
|
|
16661
|
+
if (isActiveSelection && (obj instanceof fabric__namespace.FabricImage || obj instanceof fabric__namespace.Group && obj.__cropGroup)) {
|
|
16662
|
+
const restore = activeSelectionFlipRestores.find((entry) => entry.obj === obj);
|
|
16663
|
+
if (restore) {
|
|
16664
|
+
restore.worldAngle = Number.isFinite(elementUpdate.angle) ? elementUpdate.angle : persistedAngle;
|
|
16665
|
+
}
|
|
16666
|
+
}
|
|
16536
16667
|
if (isActiveSelection) {
|
|
16537
16668
|
logRotGroupImageDrift("store-update-child", {
|
|
16538
16669
|
time: Math.round(performance.now()),
|
|
@@ -16629,14 +16760,14 @@ const PageCanvas = react.forwardRef(
|
|
|
16629
16760
|
skipActiveSelectionBakeOnClearRef.current = true;
|
|
16630
16761
|
try {
|
|
16631
16762
|
for (const restore of activeSelectionFlipRestores) {
|
|
16632
|
-
|
|
16763
|
+
restorePersistedFlipFlagsOnly(restore.obj, restore.flipX, restore.flipY);
|
|
16633
16764
|
}
|
|
16634
16765
|
fabricCanvas.discardActiveObject();
|
|
16635
16766
|
} finally {
|
|
16636
16767
|
skipActiveSelectionBakeOnClearRef.current = false;
|
|
16637
16768
|
}
|
|
16638
16769
|
for (const restore of activeSelectionFlipRestores) {
|
|
16639
|
-
restorePersistedFlipState(restore.obj, restore.flipX, restore.flipY
|
|
16770
|
+
restorePersistedFlipState(restore.obj, restore.flipX, restore.flipY);
|
|
16640
16771
|
}
|
|
16641
16772
|
for (const bake of pendingCropGroupFrameBakes) {
|
|
16642
16773
|
const ct = bake.obj.__cropData;
|
|
@@ -16658,7 +16789,7 @@ const PageCanvas = react.forwardRef(
|
|
|
16658
16789
|
bake.obj.setCoords();
|
|
16659
16790
|
}
|
|
16660
16791
|
for (const restore of activeSelectionFlipRestores) {
|
|
16661
|
-
restorePersistedFlipState(restore.obj, restore.flipX, restore.flipY
|
|
16792
|
+
restorePersistedFlipState(restore.obj, restore.flipX, restore.flipY);
|
|
16662
16793
|
}
|
|
16663
16794
|
if (membersToReselect.length > 1) {
|
|
16664
16795
|
const newSel = new fabric__namespace.ActiveSelection(membersToReselect, { canvas: fabricCanvas });
|
|
@@ -16717,6 +16848,10 @@ const PageCanvas = react.forwardRef(
|
|
|
16717
16848
|
if (t instanceof fabric__namespace.ActiveSelection) {
|
|
16718
16849
|
for (const child of t.getObjects()) {
|
|
16719
16850
|
delete child.__asLiveOrigAngle;
|
|
16851
|
+
delete child.__asLiveOrigFlipX;
|
|
16852
|
+
delete child.__asLiveOrigFlipY;
|
|
16853
|
+
delete child.__asLiveOrigScaleX;
|
|
16854
|
+
delete child.__asLiveOrigScaleY;
|
|
16720
16855
|
delete child.__asLiveGestureKey;
|
|
16721
16856
|
delete child.__asLiveWorldAngle;
|
|
16722
16857
|
delete child.__asLiveWorldCenterX;
|
|
@@ -25827,9 +25962,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
25827
25962
|
}
|
|
25828
25963
|
return svgString;
|
|
25829
25964
|
}
|
|
25830
|
-
const resolvedPackageVersion = "0.5.
|
|
25965
|
+
const resolvedPackageVersion = "0.5.448";
|
|
25831
25966
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
25832
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
25967
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.448";
|
|
25833
25968
|
const roundParityValue = (value) => {
|
|
25834
25969
|
if (typeof value !== "number") return value;
|
|
25835
25970
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -26643,7 +26778,7 @@ class PixldocsRenderer {
|
|
|
26643
26778
|
await this.waitForCanvasScene(container, cloned, i);
|
|
26644
26779
|
}
|
|
26645
26780
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
26646
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26781
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-B9AA07qB.cjs"));
|
|
26647
26782
|
const prepared = preparePagesForExport(
|
|
26648
26783
|
cloned.pages,
|
|
26649
26784
|
canvasWidth,
|
|
@@ -28963,7 +29098,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
28963
29098
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
28964
29099
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
28965
29100
|
try {
|
|
28966
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
29101
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-B9AA07qB.cjs"));
|
|
28967
29102
|
try {
|
|
28968
29103
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
28969
29104
|
} catch {
|
|
@@ -29360,4 +29495,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
29360
29495
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
29361
29496
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
29362
29497
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
29363
|
-
//# sourceMappingURL=index-
|
|
29498
|
+
//# sourceMappingURL=index-CzxefTLk.cjs.map
|