@pixldocs/canvas-renderer 0.5.411 → 0.5.412
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-DIx3vAjy.js → index-CVR5UGAs.js} +254 -106
- package/dist/index-CVR5UGAs.js.map +1 -0
- package/dist/{index-BzO7hSG5.cjs → index-Df-U5xVu.cjs} +254 -106
- package/dist/index-Df-U5xVu.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-DUaCeIGH.cjs → vectorPdfExport-CywX_PY0.cjs} +4 -4
- package/dist/{vectorPdfExport-DUaCeIGH.cjs.map → vectorPdfExport-CywX_PY0.cjs.map} +1 -1
- package/dist/{vectorPdfExport-DgFZfNsT.js → vectorPdfExport-pDEJNOs8.js} +4 -4
- package/dist/{vectorPdfExport-DgFZfNsT.js.map → vectorPdfExport-pDEJNOs8.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BzO7hSG5.cjs.map +0 -1
- package/dist/index-DIx3vAjy.js.map +0 -1
|
@@ -15188,7 +15188,6 @@ const PageCanvas = forwardRef(
|
|
|
15188
15188
|
delete child.__asLiveOrigW;
|
|
15189
15189
|
delete child.__asLiveOrigH;
|
|
15190
15190
|
delete child.__asLiveRotSnap;
|
|
15191
|
-
delete child.__asLiveOrigAngle;
|
|
15192
15191
|
}
|
|
15193
15192
|
}
|
|
15194
15193
|
} catch {
|
|
@@ -15751,48 +15750,99 @@ const PageCanvas = forwardRef(
|
|
|
15751
15750
|
if (obj instanceof fabric.Group && obj.__cropGroup) {
|
|
15752
15751
|
const ct = obj.__cropData;
|
|
15753
15752
|
if (ct) {
|
|
15754
|
-
const
|
|
15755
|
-
const
|
|
15756
|
-
const
|
|
15757
|
-
const
|
|
15758
|
-
|
|
15759
|
-
|
|
15760
|
-
|
|
15761
|
-
|
|
15762
|
-
|
|
15763
|
-
|
|
15764
|
-
|
|
15765
|
-
|
|
15766
|
-
|
|
15767
|
-
|
|
15768
|
-
|
|
15769
|
-
|
|
15770
|
-
|
|
15771
|
-
|
|
15772
|
-
|
|
15773
|
-
|
|
15774
|
-
|
|
15775
|
-
|
|
15776
|
-
|
|
15777
|
-
|
|
15778
|
-
|
|
15753
|
+
const cropChildLocalAngle = obj.__asLiveOrigAngle != null ? obj.__asLiveOrigAngle : obj.angle ?? 0;
|
|
15754
|
+
const cropChildNormAngle = (cropChildLocalAngle % 360 + 360) % 360;
|
|
15755
|
+
const cropChildIsRotated = Math.abs(cropChildNormAngle) > 0.5 && Math.abs(cropChildNormAngle - 360) > 0.5;
|
|
15756
|
+
const cropHandle = activeSelectionResizeHandle;
|
|
15757
|
+
const cropIsSideHandle = cropHandle === "ml" || cropHandle === "mr" || cropHandle === "mt" || cropHandle === "mb";
|
|
15758
|
+
const cropIsXSide = cropHandle === "ml" || cropHandle === "mr";
|
|
15759
|
+
if (isActiveSelection && activeObj instanceof fabric.ActiveSelection && cropChildIsRotated && cropIsSideHandle) {
|
|
15760
|
+
const sourceFrameW = Math.max(1, ct.frameW ?? obj.width ?? 1);
|
|
15761
|
+
const sourceFrameH = Math.max(1, ct.frameH ?? obj.height ?? 1);
|
|
15762
|
+
const asSx = Math.abs(activeObj.scaleX ?? 1);
|
|
15763
|
+
const asSy = Math.abs(activeObj.scaleY ?? 1);
|
|
15764
|
+
const axisScale = cropIsXSide ? asSx : asSy;
|
|
15765
|
+
const thetaC = fabric.util.degreesToRadians(cropChildLocalAngle);
|
|
15766
|
+
const cosC = Math.cos(thetaC);
|
|
15767
|
+
const sinC = Math.sin(thetaC);
|
|
15768
|
+
const sLocal = axisScale * cosC * cosC + sinC * sinC;
|
|
15769
|
+
const ownSx = Math.abs(obj.scaleX ?? 1);
|
|
15770
|
+
const ownSy = Math.abs(obj.scaleY ?? 1);
|
|
15771
|
+
const newFrameW = cropIsXSide ? sourceFrameW * ownSx * sLocal : sourceFrameW * ownSx;
|
|
15772
|
+
const newFrameH = cropIsXSide ? sourceFrameH * ownSy : sourceFrameH * ownSy * sLocal;
|
|
15773
|
+
finalWidth = Math.max(1, newFrameW);
|
|
15774
|
+
finalHeight = Math.max(1, newFrameH);
|
|
15775
|
+
finalScaleX = 1;
|
|
15776
|
+
finalScaleY = 1;
|
|
15777
|
+
const worldCx = decomposed.translateX ?? 0;
|
|
15778
|
+
const worldCy = decomposed.translateY ?? 0;
|
|
15779
|
+
const worldAngle = (activeObj.angle ?? 0) + cropChildLocalAngle;
|
|
15780
|
+
absoluteLeft = worldCx - finalWidth / 2;
|
|
15781
|
+
absoluteTop = worldCy - finalHeight / 2;
|
|
15782
|
+
finalAbsoluteMatrix = fabric.util.composeMatrix({
|
|
15783
|
+
translateX: worldCx,
|
|
15784
|
+
translateY: worldCy,
|
|
15785
|
+
angle: worldAngle,
|
|
15786
|
+
scaleX: 1,
|
|
15787
|
+
scaleY: 1,
|
|
15788
|
+
skewX: 0,
|
|
15789
|
+
skewY: 0
|
|
15790
|
+
});
|
|
15779
15791
|
pendingCropGroupFrameBakes.push({
|
|
15780
15792
|
obj,
|
|
15781
15793
|
width: finalWidth,
|
|
15782
15794
|
height: finalHeight,
|
|
15783
15795
|
left: absoluteLeft,
|
|
15784
15796
|
top: absoluteTop,
|
|
15785
|
-
angle:
|
|
15797
|
+
angle: worldAngle
|
|
15786
15798
|
});
|
|
15787
|
-
|
|
15799
|
+
obj.__lastResizeHandle = null;
|
|
15788
15800
|
ct.frameW = finalWidth;
|
|
15789
15801
|
ct.frameH = finalHeight;
|
|
15790
|
-
|
|
15791
|
-
|
|
15792
|
-
|
|
15793
|
-
|
|
15794
|
-
|
|
15795
|
-
|
|
15802
|
+
} else {
|
|
15803
|
+
const sourceFrameW = Math.max(1, ct.frameW ?? obj.width ?? 1);
|
|
15804
|
+
const sourceFrameH = Math.max(1, ct.frameH ?? obj.height ?? 1);
|
|
15805
|
+
const appliedScaleX = isActiveSelection && activeObj ? Math.abs((activeObj.scaleX ?? 1) * (obj.scaleX ?? 1)) : Math.abs(obj.scaleX ?? 1);
|
|
15806
|
+
const appliedScaleY = isActiveSelection && activeObj ? Math.abs((activeObj.scaleY ?? 1) * (obj.scaleY ?? 1)) : Math.abs(obj.scaleY ?? 1);
|
|
15807
|
+
finalWidth = Math.max(1, sourceFrameW * appliedScaleX);
|
|
15808
|
+
finalHeight = Math.max(1, sourceFrameH * appliedScaleY);
|
|
15809
|
+
finalScaleX = 1;
|
|
15810
|
+
finalScaleY = 1;
|
|
15811
|
+
if (isActiveSelection && activeObj instanceof fabric.ActiveSelection) {
|
|
15812
|
+
absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
|
|
15813
|
+
absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
|
|
15814
|
+
} else {
|
|
15815
|
+
absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
|
|
15816
|
+
absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
|
|
15817
|
+
}
|
|
15818
|
+
finalAbsoluteMatrix = fabric.util.composeMatrix({
|
|
15819
|
+
translateX: absoluteLeft + finalWidth / 2,
|
|
15820
|
+
translateY: absoluteTop + finalHeight / 2,
|
|
15821
|
+
angle: decomposed.angle ?? (obj.angle ?? 0),
|
|
15822
|
+
scaleX: 1,
|
|
15823
|
+
scaleY: 1,
|
|
15824
|
+
skewX: 0,
|
|
15825
|
+
skewY: 0
|
|
15826
|
+
});
|
|
15827
|
+
if (isActiveSelection && activeObj instanceof fabric.ActiveSelection) {
|
|
15828
|
+
pendingCropGroupFrameBakes.push({
|
|
15829
|
+
obj,
|
|
15830
|
+
width: finalWidth,
|
|
15831
|
+
height: finalHeight,
|
|
15832
|
+
left: absoluteLeft,
|
|
15833
|
+
top: absoluteTop,
|
|
15834
|
+
angle: decomposed.angle ?? (obj.angle ?? 0)
|
|
15835
|
+
});
|
|
15836
|
+
} else {
|
|
15837
|
+
ct.frameW = finalWidth;
|
|
15838
|
+
ct.frameH = finalHeight;
|
|
15839
|
+
obj.set({ width: finalWidth, height: finalHeight, scaleX: 1, scaleY: 1 });
|
|
15840
|
+
updateCoverLayout(obj);
|
|
15841
|
+
}
|
|
15842
|
+
obj.__lastResizeHandle = null;
|
|
15843
|
+
if (!isActiveSelection) {
|
|
15844
|
+
fabricCanvas.setActiveObject(obj);
|
|
15845
|
+
}
|
|
15796
15846
|
}
|
|
15797
15847
|
}
|
|
15798
15848
|
} else if (obj instanceof fabric.FabricImage) {
|
|
@@ -15818,79 +15868,130 @@ const PageCanvas = forwardRef(
|
|
|
15818
15868
|
useEditorStore.getState().updateElement(objId, { src: newSrc }, { recordHistory: false, skipLayoutRecalc: true });
|
|
15819
15869
|
}
|
|
15820
15870
|
} else if (isActiveSelection && (Math.abs((decomposed.scaleX ?? 1) - 1) > 1e-3 || Math.abs((decomposed.scaleY ?? 1) - 1) > 1e-3)) {
|
|
15821
|
-
const
|
|
15822
|
-
const
|
|
15823
|
-
const
|
|
15824
|
-
const
|
|
15825
|
-
|
|
15826
|
-
|
|
15827
|
-
|
|
15828
|
-
|
|
15829
|
-
|
|
15830
|
-
const
|
|
15831
|
-
|
|
15832
|
-
|
|
15833
|
-
|
|
15834
|
-
|
|
15835
|
-
|
|
15836
|
-
|
|
15837
|
-
|
|
15838
|
-
|
|
15839
|
-
|
|
15840
|
-
|
|
15841
|
-
|
|
15842
|
-
|
|
15843
|
-
|
|
15844
|
-
|
|
15871
|
+
const imgChildLocalAngle = obj.__asLiveOrigAngle != null ? obj.__asLiveOrigAngle : obj.angle ?? 0;
|
|
15872
|
+
const imgChildNormAngle = (imgChildLocalAngle % 360 + 360) % 360;
|
|
15873
|
+
const imgChildIsRotated = Math.abs(imgChildNormAngle) > 0.5 && Math.abs(imgChildNormAngle - 360) > 0.5;
|
|
15874
|
+
const imgHandle = activeSelectionResizeHandle;
|
|
15875
|
+
const imgIsSideHandle = imgHandle === "ml" || imgHandle === "mr" || imgHandle === "mt" || imgHandle === "mb";
|
|
15876
|
+
const imgIsXSide = imgHandle === "ml" || imgHandle === "mr";
|
|
15877
|
+
if (imgChildIsRotated && imgIsSideHandle && activeObj instanceof fabric.ActiveSelection) {
|
|
15878
|
+
const asSx = Math.abs(activeObj.scaleX ?? 1);
|
|
15879
|
+
const asSy = Math.abs(activeObj.scaleY ?? 1);
|
|
15880
|
+
const axisScale = imgIsXSide ? asSx : asSy;
|
|
15881
|
+
const thetaI = fabric.util.degreesToRadians(imgChildLocalAngle);
|
|
15882
|
+
const cI = Math.cos(thetaI);
|
|
15883
|
+
const sI = Math.sin(thetaI);
|
|
15884
|
+
const sLocalI = axisScale * cI * cI + sI * sI;
|
|
15885
|
+
const ownSx = Math.abs(obj.scaleX ?? 1);
|
|
15886
|
+
const ownSy = Math.abs(obj.scaleY ?? 1);
|
|
15887
|
+
const bakedW = Math.max(1, intrinsicWidth * ownSx * (imgIsXSide ? sLocalI : 1));
|
|
15888
|
+
const bakedH = Math.max(1, intrinsicHeight * ownSy * (imgIsXSide ? 1 : sLocalI));
|
|
15889
|
+
try {
|
|
15890
|
+
obj.set({
|
|
15891
|
+
width: bakedW,
|
|
15892
|
+
height: bakedH,
|
|
15893
|
+
scaleX: 1,
|
|
15894
|
+
scaleY: 1,
|
|
15895
|
+
skewX: 0,
|
|
15896
|
+
skewY: 0
|
|
15897
|
+
});
|
|
15898
|
+
obj.dirty = true;
|
|
15899
|
+
obj.setCoords();
|
|
15900
|
+
} catch {
|
|
15901
|
+
}
|
|
15902
|
+
finalWidth = bakedW;
|
|
15903
|
+
finalHeight = bakedH;
|
|
15904
|
+
finalScaleX = 1;
|
|
15905
|
+
finalScaleY = 1;
|
|
15906
|
+
const worldCx = decomposed.translateX ?? 0;
|
|
15907
|
+
const worldCy = decomposed.translateY ?? 0;
|
|
15908
|
+
const worldAngleI = (activeObj.angle ?? 0) + imgChildLocalAngle;
|
|
15909
|
+
absoluteLeft = worldCx - finalWidth / 2;
|
|
15910
|
+
absoluteTop = worldCy - finalHeight / 2;
|
|
15911
|
+
finalAbsoluteMatrix = fabric.util.composeMatrix({
|
|
15912
|
+
translateX: worldCx,
|
|
15913
|
+
translateY: worldCy,
|
|
15914
|
+
angle: worldAngleI,
|
|
15845
15915
|
scaleX: 1,
|
|
15846
15916
|
scaleY: 1,
|
|
15847
|
-
|
|
15917
|
+
skewX: 0,
|
|
15918
|
+
skewY: 0
|
|
15848
15919
|
});
|
|
15849
|
-
|
|
15850
|
-
|
|
15851
|
-
|
|
15852
|
-
|
|
15853
|
-
|
|
15854
|
-
|
|
15855
|
-
|
|
15856
|
-
|
|
15857
|
-
|
|
15858
|
-
|
|
15859
|
-
|
|
15860
|
-
|
|
15861
|
-
|
|
15862
|
-
|
|
15863
|
-
|
|
15864
|
-
|
|
15865
|
-
|
|
15866
|
-
|
|
15867
|
-
|
|
15868
|
-
|
|
15920
|
+
} else {
|
|
15921
|
+
const sx = Math.abs(decomposed.scaleX || 1);
|
|
15922
|
+
const sy = Math.abs(decomposed.scaleY || 1);
|
|
15923
|
+
const handle = activeSelectionResizeHandle;
|
|
15924
|
+
const isCornerHandle = handle === "tl" || handle === "tr" || handle === "bl" || handle === "br" || // Fallback: if handle ref is missing and sx≈sy with non-1 magnitude,
|
|
15925
|
+
// treat as a uniform corner drag.
|
|
15926
|
+
!handle && Math.abs(sx - sy) < 0.01 && Math.abs(sx - 1) > 1e-3;
|
|
15927
|
+
let fx;
|
|
15928
|
+
let fy;
|
|
15929
|
+
if (isCornerHandle) {
|
|
15930
|
+
const u = Math.max(1e-3, Math.sqrt(sx * sy));
|
|
15931
|
+
fx = u;
|
|
15932
|
+
fy = u;
|
|
15933
|
+
} else {
|
|
15934
|
+
fx = sx;
|
|
15935
|
+
fy = sy;
|
|
15936
|
+
}
|
|
15937
|
+
const bakedW = Math.max(1, intrinsicWidth * fx);
|
|
15938
|
+
const bakedH = Math.max(1, intrinsicHeight * fy);
|
|
15939
|
+
try {
|
|
15940
|
+
const preBakeCenter = obj.getCenterPoint();
|
|
15941
|
+
const prevObjCaching = obj.objectCaching;
|
|
15942
|
+
obj.set({
|
|
15943
|
+
width: bakedW,
|
|
15944
|
+
height: bakedH,
|
|
15945
|
+
scaleX: 1,
|
|
15946
|
+
scaleY: 1,
|
|
15947
|
+
objectCaching: false
|
|
15948
|
+
});
|
|
15949
|
+
obj.objectCaching = prevObjCaching;
|
|
15950
|
+
if (sx > 0 && sy > 0) {
|
|
15951
|
+
const localScaleX = 1 / sx;
|
|
15952
|
+
const localScaleY = 1 / sy;
|
|
15953
|
+
obj.set({ scaleX: localScaleX, scaleY: localScaleY });
|
|
15954
|
+
const selectionMatrix = (_h = activeObj == null ? void 0 : activeObj.calcTransformMatrix) == null ? void 0 : _h.call(activeObj);
|
|
15955
|
+
const localCenter = selectionMatrix ? fabric.util.transformPoint(preBakeCenter, fabric.util.invertTransform(selectionMatrix)) : preBakeCenter;
|
|
15956
|
+
const localWidth = bakedW * localScaleX;
|
|
15957
|
+
const localHeight = bakedH * localScaleY;
|
|
15958
|
+
const isCenterOrigin = obj.originX === "center" || obj.originY === "center";
|
|
15959
|
+
if (isCenterOrigin) {
|
|
15960
|
+
obj.set({
|
|
15961
|
+
left: localCenter.x,
|
|
15962
|
+
top: localCenter.y
|
|
15963
|
+
});
|
|
15964
|
+
} else {
|
|
15965
|
+
obj.set({
|
|
15966
|
+
left: localCenter.x - localWidth / 2,
|
|
15967
|
+
top: localCenter.y - localHeight / 2
|
|
15968
|
+
});
|
|
15969
|
+
}
|
|
15869
15970
|
}
|
|
15971
|
+
obj.dirty = true;
|
|
15972
|
+
if (activeObj) activeObj.dirty = true;
|
|
15973
|
+
obj.setCoords();
|
|
15974
|
+
} catch {
|
|
15870
15975
|
}
|
|
15871
|
-
|
|
15872
|
-
|
|
15873
|
-
|
|
15874
|
-
|
|
15875
|
-
|
|
15876
|
-
|
|
15877
|
-
|
|
15878
|
-
|
|
15879
|
-
|
|
15880
|
-
|
|
15881
|
-
|
|
15882
|
-
|
|
15883
|
-
|
|
15976
|
+
finalWidth = bakedW;
|
|
15977
|
+
finalHeight = bakedH;
|
|
15978
|
+
finalScaleX = 1;
|
|
15979
|
+
finalScaleY = 1;
|
|
15980
|
+
try {
|
|
15981
|
+
absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
|
|
15982
|
+
absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
|
|
15983
|
+
} catch {
|
|
15984
|
+
}
|
|
15985
|
+
finalAbsoluteMatrix = fabric.util.composeMatrix({
|
|
15986
|
+
translateX: decomposed.translateX,
|
|
15987
|
+
translateY: decomposed.translateY,
|
|
15988
|
+
angle: decomposed.angle ?? 0,
|
|
15989
|
+
scaleX: 1,
|
|
15990
|
+
scaleY: 1,
|
|
15991
|
+
skewX: 0,
|
|
15992
|
+
skewY: 0
|
|
15993
|
+
});
|
|
15884
15994
|
}
|
|
15885
|
-
finalAbsoluteMatrix = fabric.util.composeMatrix({
|
|
15886
|
-
translateX: decomposed.translateX,
|
|
15887
|
-
translateY: decomposed.translateY,
|
|
15888
|
-
angle: decomposed.angle ?? 0,
|
|
15889
|
-
scaleX: 1,
|
|
15890
|
-
scaleY: 1,
|
|
15891
|
-
skewX: 0,
|
|
15892
|
-
skewY: 0
|
|
15893
|
-
});
|
|
15894
15995
|
} else {
|
|
15895
15996
|
finalWidth = intrinsicWidth;
|
|
15896
15997
|
finalHeight = intrinsicHeight;
|
|
@@ -16146,6 +16247,44 @@ const PageCanvas = forwardRef(
|
|
|
16146
16247
|
}
|
|
16147
16248
|
}
|
|
16148
16249
|
}
|
|
16250
|
+
const isCropGroupObj = obj instanceof fabric.Group && obj.__cropGroup;
|
|
16251
|
+
const isPlainImageObj = obj instanceof fabric.FabricImage && !obj.__cropGroup && !obj.smartElementType;
|
|
16252
|
+
if (isActiveSelection && isActiveSelectionSideHandle && (isCropGroupObj || isPlainImageObj)) {
|
|
16253
|
+
const childLocalAngleSrc = obj.__asLiveOrigAngle != null ? obj.__asLiveOrigAngle : Number.isFinite(sourceElement == null ? void 0 : sourceElement.angle) ? sourceElement.angle ?? 0 : obj.angle ?? 0;
|
|
16254
|
+
const normAng = (childLocalAngleSrc % 360 + 360) % 360;
|
|
16255
|
+
const isRotatedImg = Math.min(normAng, 360 - normAng) > 0.5;
|
|
16256
|
+
if (isRotatedImg && activeObj instanceof fabric.ActiveSelection) {
|
|
16257
|
+
try {
|
|
16258
|
+
const cleanAngleI = (activeObj.angle ?? 0) + childLocalAngleSrc;
|
|
16259
|
+
const cleanW = Math.max(1, Number(elementUpdate.width ?? finalWidth));
|
|
16260
|
+
const cleanH = Math.max(1, Number(elementUpdate.height ?? finalHeight));
|
|
16261
|
+
const cx = decomposed.translateX ?? absoluteLeft + cleanW / 2;
|
|
16262
|
+
const cy = decomposed.translateY ?? absoluteTop + cleanH / 2;
|
|
16263
|
+
const cleanAbsLeft = cx - cleanW / 2;
|
|
16264
|
+
const cleanAbsTop = cy - cleanH / 2;
|
|
16265
|
+
const cleanStorePos = absoluteToStorePosition(cleanAbsLeft, cleanAbsTop, objId, pageChildrenForSave);
|
|
16266
|
+
elementUpdate.left = cleanStorePos.left;
|
|
16267
|
+
elementUpdate.top = cleanStorePos.top;
|
|
16268
|
+
elementUpdate.width = cleanW;
|
|
16269
|
+
elementUpdate.height = cleanH;
|
|
16270
|
+
elementUpdate.angle = cleanAngleI;
|
|
16271
|
+
elementUpdate.scaleX = 1;
|
|
16272
|
+
elementUpdate.scaleY = 1;
|
|
16273
|
+
elementUpdate.skewX = 0;
|
|
16274
|
+
elementUpdate.skewY = 0;
|
|
16275
|
+
elementUpdate.transformMatrix = fabric.util.composeMatrix({
|
|
16276
|
+
translateX: cx,
|
|
16277
|
+
translateY: cy,
|
|
16278
|
+
angle: cleanAngleI,
|
|
16279
|
+
scaleX: 1,
|
|
16280
|
+
scaleY: 1,
|
|
16281
|
+
skewX: 0,
|
|
16282
|
+
skewY: 0
|
|
16283
|
+
});
|
|
16284
|
+
} catch {
|
|
16285
|
+
}
|
|
16286
|
+
}
|
|
16287
|
+
}
|
|
16149
16288
|
if (debugGroupTextCornerResize && obj instanceof fabric.Textbox) {
|
|
16150
16289
|
logGroupTextResizeDebug("store-update-text", {
|
|
16151
16290
|
time: Math.round(performance.now()),
|
|
@@ -16306,6 +16445,15 @@ const PageCanvas = forwardRef(
|
|
|
16306
16445
|
groupSelectionTransformStartRef.current = null;
|
|
16307
16446
|
activeSelectionMoveStartRef.current = null;
|
|
16308
16447
|
activeSelectionResizeHandleRef.current = null;
|
|
16448
|
+
try {
|
|
16449
|
+
const t = e.target;
|
|
16450
|
+
if (t instanceof fabric.ActiveSelection) {
|
|
16451
|
+
for (const child of t.getObjects()) {
|
|
16452
|
+
delete child.__asLiveOrigAngle;
|
|
16453
|
+
}
|
|
16454
|
+
}
|
|
16455
|
+
} catch {
|
|
16456
|
+
}
|
|
16309
16457
|
setTimeout(() => modifiedIdsThisRound.forEach((id) => justModifiedIdsRef.current.delete(id)), 150);
|
|
16310
16458
|
commitHistory();
|
|
16311
16459
|
unlockEditsSoon();
|
|
@@ -25373,9 +25521,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
25373
25521
|
}
|
|
25374
25522
|
return svgString;
|
|
25375
25523
|
}
|
|
25376
|
-
const resolvedPackageVersion = "0.5.
|
|
25524
|
+
const resolvedPackageVersion = "0.5.412";
|
|
25377
25525
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
25378
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
25526
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.412";
|
|
25379
25527
|
const roundParityValue = (value) => {
|
|
25380
25528
|
if (typeof value !== "number") return value;
|
|
25381
25529
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -26189,7 +26337,7 @@ class PixldocsRenderer {
|
|
|
26189
26337
|
await this.waitForCanvasScene(container, cloned, i);
|
|
26190
26338
|
}
|
|
26191
26339
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
26192
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
26340
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-pDEJNOs8.js");
|
|
26193
26341
|
const prepared = preparePagesForExport(
|
|
26194
26342
|
cloned.pages,
|
|
26195
26343
|
canvasWidth,
|
|
@@ -28509,7 +28657,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
28509
28657
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
28510
28658
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
28511
28659
|
try {
|
|
28512
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
28660
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-pDEJNOs8.js");
|
|
28513
28661
|
try {
|
|
28514
28662
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
28515
28663
|
} catch {
|
|
@@ -28909,4 +29057,4 @@ export {
|
|
|
28909
29057
|
buildTeaserBlurFlatKeys as y,
|
|
28910
29058
|
collectFontDescriptorsFromConfig as z
|
|
28911
29059
|
};
|
|
28912
|
-
//# sourceMappingURL=index-
|
|
29060
|
+
//# sourceMappingURL=index-CVR5UGAs.js.map
|