@pixldocs/canvas-renderer 0.5.331 → 0.5.333
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-C9n6xrCt.js → index-CAdMLx_E.js} +222 -17
- package/dist/index-CAdMLx_E.js.map +1 -0
- package/dist/{index-COZR9zOa.cjs → index-k8mzlqgs.cjs} +222 -17
- package/dist/index-k8mzlqgs.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-DvpRTaGb.js → vectorPdfExport-BSV5NYSE.js} +4 -4
- package/dist/{vectorPdfExport-DvpRTaGb.js.map → vectorPdfExport-BSV5NYSE.js.map} +1 -1
- package/dist/{vectorPdfExport-07IeD7w3.cjs → vectorPdfExport-Cc-1U0NL.cjs} +4 -4
- package/dist/{vectorPdfExport-07IeD7w3.cjs.map → vectorPdfExport-Cc-1U0NL.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-C9n6xrCt.js.map +0 -1
- package/dist/index-COZR9zOa.cjs.map +0 -1
|
@@ -11025,6 +11025,8 @@ const scaleUpdateNumber = (updates, source, key, factor) => {
|
|
|
11025
11025
|
};
|
|
11026
11026
|
const GROUP_TEXT_RESIZE_DEBUG_PREFIX = "[Pixldocs][group-text-corner-resize]";
|
|
11027
11027
|
const GROUP_TEXT_RESIZE_DEBUG_MAX_ENTRIES = 200;
|
|
11028
|
+
const GROUP_IMAGE_RESIZE_DEBUG_PREFIX = "[Pixldocs][group-image-side-resize]";
|
|
11029
|
+
const GROUP_IMAGE_RESIZE_DEBUG_MAX_ENTRIES = 300;
|
|
11028
11030
|
const isCornerResizeHandle = (handle) => handle === "tl" || handle === "tr" || handle === "bl" || handle === "br";
|
|
11029
11031
|
const summarizeFabricObjectForResizeDebug = (obj) => {
|
|
11030
11032
|
var _a2;
|
|
@@ -11087,6 +11089,43 @@ const logGroupTextResizeDebug = (phase, payload) => {
|
|
|
11087
11089
|
console.log(GROUP_TEXT_RESIZE_DEBUG_PREFIX, phase, payload);
|
|
11088
11090
|
}
|
|
11089
11091
|
};
|
|
11092
|
+
const isGroupResizeImageLikeObject = (obj) => {
|
|
11093
|
+
var _a2;
|
|
11094
|
+
return !!obj && (obj instanceof fabric.FabricImage || obj instanceof fabric.Group && (obj.__cropGroup || ((_a2 = obj._ct) == null ? void 0 : _a2.isCropGroup)));
|
|
11095
|
+
};
|
|
11096
|
+
const logGroupImageResizeDebug = (phase, payload) => {
|
|
11097
|
+
if (typeof console === "undefined") return;
|
|
11098
|
+
try {
|
|
11099
|
+
const seen = /* @__PURE__ */ new WeakSet();
|
|
11100
|
+
const normalize = (value) => {
|
|
11101
|
+
if (value == null) return value;
|
|
11102
|
+
const valueType = typeof value;
|
|
11103
|
+
if (valueType === "number") return Number.isFinite(value) ? Math.round(value * 1e3) / 1e3 : String(value);
|
|
11104
|
+
if (valueType === "string" || valueType === "boolean") return value;
|
|
11105
|
+
if (valueType === "function") return `[Function ${value.name || "anonymous"}]`;
|
|
11106
|
+
if (Array.isArray(value)) return value.map((entry) => normalize(entry));
|
|
11107
|
+
if (valueType === "object") {
|
|
11108
|
+
if (seen.has(value)) return "[Circular]";
|
|
11109
|
+
seen.add(value);
|
|
11110
|
+
if (value instanceof fabric.FabricObject) return normalize(summarizeFabricObjectForResizeDebug(value));
|
|
11111
|
+
const output = {};
|
|
11112
|
+
Object.entries(value).forEach(([key, entry]) => {
|
|
11113
|
+
output[key] = normalize(entry);
|
|
11114
|
+
});
|
|
11115
|
+
return output;
|
|
11116
|
+
}
|
|
11117
|
+
return String(value);
|
|
11118
|
+
};
|
|
11119
|
+
const normalizedPayload = normalize(payload);
|
|
11120
|
+
const line = `${GROUP_IMAGE_RESIZE_DEBUG_PREFIX} ${phase} ${JSON.stringify(normalizedPayload)}`;
|
|
11121
|
+
const debugWindow = window;
|
|
11122
|
+
debugWindow.__pixldocsGroupImageResizeLogs = Array.isArray(debugWindow.__pixldocsGroupImageResizeLogs) ? debugWindow.__pixldocsGroupImageResizeLogs.slice(-GROUP_IMAGE_RESIZE_DEBUG_MAX_ENTRIES + 1) : [];
|
|
11123
|
+
debugWindow.__pixldocsGroupImageResizeLogs.push(line);
|
|
11124
|
+
console.log(line);
|
|
11125
|
+
} catch {
|
|
11126
|
+
console.log(GROUP_IMAGE_RESIZE_DEBUG_PREFIX, phase, payload);
|
|
11127
|
+
}
|
|
11128
|
+
};
|
|
11090
11129
|
const bakeTextboxScaleIntoTypography = (obj, sourceElement) => {
|
|
11091
11130
|
const sx = Math.abs(obj.scaleX ?? 1) || 1;
|
|
11092
11131
|
const sy = Math.abs(obj.scaleY ?? 1) || 1;
|
|
@@ -13743,7 +13782,25 @@ const PageCanvas = forwardRef(
|
|
|
13743
13782
|
const a = ((c.angle ?? 0) % 180 + 180) % 180;
|
|
13744
13783
|
return !(a < 0.5 || a > 179.5);
|
|
13745
13784
|
});
|
|
13746
|
-
|
|
13785
|
+
const selectionAngle = ((obj.angle ?? 0) % 180 + 180) % 180;
|
|
13786
|
+
const isSelectionRotated = !(selectionAngle < 0.5 || selectionAngle > 179.5);
|
|
13787
|
+
const shouldPinNonTextChildren = hasRotatedChild || isSelectionRotated;
|
|
13788
|
+
const shouldDebugGroupImageResize = obj.getObjects().some((child) => isGroupResizeImageLikeObject(child));
|
|
13789
|
+
if (shouldDebugGroupImageResize) {
|
|
13790
|
+
logGroupImageResizeDebug("live-start", {
|
|
13791
|
+
time: Math.round(performance.now()),
|
|
13792
|
+
corner,
|
|
13793
|
+
isXSide,
|
|
13794
|
+
sAxis,
|
|
13795
|
+
hasRotatedChild,
|
|
13796
|
+
isSelectionRotated,
|
|
13797
|
+
shouldPinNonTextChildren,
|
|
13798
|
+
groupSelectionId: obj.__pixldocsGroupSelection,
|
|
13799
|
+
selection: summarizeFabricObjectForResizeDebug(obj),
|
|
13800
|
+
children: obj.getObjects().map((child) => summarizeFabricObjectForResizeDebug(child))
|
|
13801
|
+
});
|
|
13802
|
+
}
|
|
13803
|
+
if ((isXSide || shouldPinNonTextChildren) && ((_b2 = groupShiftReflowSnapshotRef.current) == null ? void 0 : _b2.selection) !== obj) {
|
|
13747
13804
|
groupShiftReflowSnapshotRef.current = null;
|
|
13748
13805
|
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
13749
13806
|
if (logicalGroupId) {
|
|
@@ -13790,22 +13847,50 @@ const PageCanvas = forwardRef(
|
|
|
13790
13847
|
}
|
|
13791
13848
|
}
|
|
13792
13849
|
const childCounterScale = hasRotatedChild ? 1 : 1 / sAxis;
|
|
13850
|
+
let restoredNonTextAfterLayout = false;
|
|
13793
13851
|
const restoreNonTextChildren = (pins) => {
|
|
13794
13852
|
var _a3, _b3;
|
|
13795
|
-
if (!
|
|
13853
|
+
if (!shouldPinNonTextChildren || ((_a3 = groupShiftReflowSnapshotRef.current) == null ? void 0 : _a3.selection) !== obj) return;
|
|
13796
13854
|
for (const entry of groupShiftReflowSnapshotRef.current.children) {
|
|
13797
13855
|
const child = entry.obj;
|
|
13798
13856
|
if (child instanceof fabric.Textbox) continue;
|
|
13799
13857
|
if (child instanceof fabric.FabricImage || child instanceof fabric.Group && (child.__cropGroup || ((_b3 = child._ct) == null ? void 0 : _b3.isCropGroup))) {
|
|
13800
13858
|
const pin = pins == null ? void 0 : pins.get(child);
|
|
13801
|
-
|
|
13802
|
-
|
|
13859
|
+
let targetLeft = hasRotatedChild && isXSide ? entry.left0 * sAxis : entry.left0;
|
|
13860
|
+
let targetTop = hasRotatedChild && !isXSide ? entry.top0 * sAxis : entry.top0;
|
|
13861
|
+
if (pin == null ? void 0 : pin.worldCenter) {
|
|
13862
|
+
try {
|
|
13863
|
+
const invSelectionMatrix = fabric.util.invertTransform(obj.calcTransformMatrix());
|
|
13864
|
+
const localCenter = fabric.util.transformPoint(pin.worldCenter, invSelectionMatrix);
|
|
13865
|
+
targetLeft = localCenter.x;
|
|
13866
|
+
targetTop = localCenter.y;
|
|
13867
|
+
} catch {
|
|
13868
|
+
targetLeft = pin.left ?? targetLeft;
|
|
13869
|
+
targetTop = pin.top ?? targetTop;
|
|
13870
|
+
}
|
|
13871
|
+
} else {
|
|
13872
|
+
targetLeft = (pin == null ? void 0 : pin.left) ?? targetLeft;
|
|
13873
|
+
targetTop = (pin == null ? void 0 : pin.top) ?? targetTop;
|
|
13874
|
+
}
|
|
13875
|
+
const beforeRestore = shouldDebugGroupImageResize ? summarizeFabricObjectForResizeDebug(child) : null;
|
|
13803
13876
|
if (Math.abs((child.left ?? 0) - targetLeft) > 0.01) child._set("left", targetLeft);
|
|
13804
13877
|
if (Math.abs((child.top ?? 0) - targetTop) > 0.01) child._set("top", targetTop);
|
|
13805
13878
|
if (isXSide) child._set("scaleX", childCounterScale);
|
|
13806
13879
|
else child._set("scaleY", childCounterScale);
|
|
13807
13880
|
child.setCoords();
|
|
13808
13881
|
child.dirty = true;
|
|
13882
|
+
if (shouldDebugGroupImageResize) {
|
|
13883
|
+
logGroupImageResizeDebug("restore-non-text", {
|
|
13884
|
+
time: Math.round(performance.now()),
|
|
13885
|
+
corner,
|
|
13886
|
+
childId: getObjectId(child),
|
|
13887
|
+
targetLeft,
|
|
13888
|
+
targetTop,
|
|
13889
|
+
pin,
|
|
13890
|
+
before: beforeRestore,
|
|
13891
|
+
after: summarizeFabricObjectForResizeDebug(child)
|
|
13892
|
+
});
|
|
13893
|
+
}
|
|
13809
13894
|
}
|
|
13810
13895
|
}
|
|
13811
13896
|
};
|
|
@@ -13819,6 +13904,7 @@ const PageCanvas = forwardRef(
|
|
|
13819
13904
|
};
|
|
13820
13905
|
for (const child of obj.getObjects()) {
|
|
13821
13906
|
if (child instanceof fabric.Group && (child.__cropGroup || ((_d = child._ct) == null ? void 0 : _d.isCropGroup))) {
|
|
13907
|
+
const beforeImageChildResize = shouldDebugGroupImageResize ? summarizeFabricObjectForResizeDebug(child) : null;
|
|
13822
13908
|
const ct = child.__cropData;
|
|
13823
13909
|
if (ct) {
|
|
13824
13910
|
if (child.__asLiveOrigW == null) {
|
|
@@ -13845,10 +13931,22 @@ const PageCanvas = forwardRef(
|
|
|
13845
13931
|
else child._set("scaleY", childCounterScale);
|
|
13846
13932
|
child.setCoords();
|
|
13847
13933
|
child.dirty = true;
|
|
13934
|
+
if (shouldDebugGroupImageResize) {
|
|
13935
|
+
logGroupImageResizeDebug("live-crop-child-resized", {
|
|
13936
|
+
time: Math.round(performance.now()),
|
|
13937
|
+
corner,
|
|
13938
|
+
sAxis,
|
|
13939
|
+
childCounterScale,
|
|
13940
|
+
before: beforeImageChildResize,
|
|
13941
|
+
after: summarizeFabricObjectForResizeDebug(child),
|
|
13942
|
+
cropData: ct ? { frameW: ct.frameW, frameH: ct.frameH } : null
|
|
13943
|
+
});
|
|
13944
|
+
}
|
|
13848
13945
|
didReflowTextChild = true;
|
|
13849
13946
|
continue;
|
|
13850
13947
|
}
|
|
13851
13948
|
if (child instanceof fabric.FabricImage && !child.__cropGroup && !child.smartElementType) {
|
|
13949
|
+
const beforeImageChildResize = shouldDebugGroupImageResize ? summarizeFabricObjectForResizeDebug(child) : null;
|
|
13852
13950
|
if (isXSide) {
|
|
13853
13951
|
if (child.__asLiveOrigW == null) {
|
|
13854
13952
|
child.__asLiveOrigW = (child.width ?? 0) * Math.abs(child.scaleX ?? 1);
|
|
@@ -13866,6 +13964,18 @@ const PageCanvas = forwardRef(
|
|
|
13866
13964
|
else child._set("scaleY", childCounterScale);
|
|
13867
13965
|
child.setCoords();
|
|
13868
13966
|
child.dirty = true;
|
|
13967
|
+
if (shouldDebugGroupImageResize) {
|
|
13968
|
+
logGroupImageResizeDebug("live-image-child-resized", {
|
|
13969
|
+
time: Math.round(performance.now()),
|
|
13970
|
+
corner,
|
|
13971
|
+
sAxis,
|
|
13972
|
+
childCounterScale,
|
|
13973
|
+
liveOrigW: child.__asLiveOrigW,
|
|
13974
|
+
liveOrigH: child.__asLiveOrigH,
|
|
13975
|
+
before: beforeImageChildResize,
|
|
13976
|
+
after: summarizeFabricObjectForResizeDebug(child)
|
|
13977
|
+
});
|
|
13978
|
+
}
|
|
13869
13979
|
didReflowTextChild = true;
|
|
13870
13980
|
continue;
|
|
13871
13981
|
}
|
|
@@ -13905,7 +14015,7 @@ const PageCanvas = forwardRef(
|
|
|
13905
14015
|
didReflowTextChild = true;
|
|
13906
14016
|
}
|
|
13907
14017
|
}
|
|
13908
|
-
if (isXSide && ((_e = groupShiftReflowSnapshotRef.current) == null ? void 0 : _e.selection) === obj) {
|
|
14018
|
+
if (isXSide && !shouldPinNonTextChildren && ((_e = groupShiftReflowSnapshotRef.current) == null ? void 0 : _e.selection) === obj) {
|
|
13909
14019
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
13910
14020
|
const anchorEntry = snap.children[0];
|
|
13911
14021
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
@@ -13938,12 +14048,26 @@ const PageCanvas = forwardRef(
|
|
|
13938
14048
|
if (cornersBefore) {
|
|
13939
14049
|
fixedMidBefore = corner === "ml" ? { x: (cornersBefore.tr.x + cornersBefore.br.x) / 2, y: (cornersBefore.tr.y + cornersBefore.br.y) / 2 } : { x: (cornersBefore.tl.x + cornersBefore.bl.x) / 2, y: (cornersBefore.tl.y + cornersBefore.bl.y) / 2 };
|
|
13940
14050
|
}
|
|
13941
|
-
const nonTextPinsBeforeLayout =
|
|
14051
|
+
const nonTextPinsBeforeLayout = shouldPinNonTextChildren ? new Map(obj.getObjects().map((child) => [child, {
|
|
14052
|
+
left: child.left ?? 0,
|
|
14053
|
+
top: child.top ?? 0,
|
|
14054
|
+
worldCenter: child instanceof fabric.Textbox ? void 0 : child.getCenterPoint()
|
|
14055
|
+
}])) : void 0;
|
|
13942
14056
|
try {
|
|
13943
14057
|
obj.triggerLayout();
|
|
13944
14058
|
} catch {
|
|
13945
14059
|
}
|
|
13946
14060
|
restoreNonTextChildren(nonTextPinsBeforeLayout);
|
|
14061
|
+
restoredNonTextAfterLayout = !!nonTextPinsBeforeLayout;
|
|
14062
|
+
if (shouldDebugGroupImageResize) {
|
|
14063
|
+
logGroupImageResizeDebug("after-trigger-layout", {
|
|
14064
|
+
time: Math.round(performance.now()),
|
|
14065
|
+
corner,
|
|
14066
|
+
selection: summarizeFabricObjectForResizeDebug(obj),
|
|
14067
|
+
nonTextPinsBeforeLayout,
|
|
14068
|
+
children: obj.getObjects().map((child) => summarizeFabricObjectForResizeDebug(child))
|
|
14069
|
+
});
|
|
14070
|
+
}
|
|
13947
14071
|
obj._set("width", asW0);
|
|
13948
14072
|
obj._set("scaleX", asSx0);
|
|
13949
14073
|
obj._set("scaleY", asSy0);
|
|
@@ -13969,7 +14093,7 @@ const PageCanvas = forwardRef(
|
|
|
13969
14093
|
obj._set("left", asLeft0);
|
|
13970
14094
|
obj._set("top", asTop0);
|
|
13971
14095
|
}
|
|
13972
|
-
restoreNonTextChildren();
|
|
14096
|
+
if (!restoredNonTextAfterLayout) restoreNonTextChildren();
|
|
13973
14097
|
obj._set("width", asW0);
|
|
13974
14098
|
obj._set("scaleX", asSx0);
|
|
13975
14099
|
obj._set("scaleY", asSy0);
|
|
@@ -14538,6 +14662,18 @@ const PageCanvas = forwardRef(
|
|
|
14538
14662
|
const isActiveSelection = activeObj instanceof fabric.ActiveSelection || activeObjects.length > 1;
|
|
14539
14663
|
const activeSelectionResizeHandle = isActiveSelection ? activeSelectionResizeHandleRef.current : null;
|
|
14540
14664
|
const debugGroupTextCornerResize = activeObj instanceof fabric.ActiveSelection && isCornerResizeHandle(activeSelectionResizeHandle) && activeObjects.some((candidate) => candidate instanceof fabric.Textbox);
|
|
14665
|
+
const debugGroupImageSideResize = activeObj instanceof fabric.ActiveSelection && (activeSelectionResizeHandle === "ml" || activeSelectionResizeHandle === "mr" || activeSelectionResizeHandle === "mt" || activeSelectionResizeHandle === "mb") && activeObjects.some((candidate) => isGroupResizeImageLikeObject(candidate));
|
|
14666
|
+
if (debugGroupImageSideResize) {
|
|
14667
|
+
logGroupImageResizeDebug("modified-start", {
|
|
14668
|
+
time: Math.round(performance.now()),
|
|
14669
|
+
handle: activeSelectionResizeHandle,
|
|
14670
|
+
target: summarizeFabricObjectForResizeDebug(modifiedTarget),
|
|
14671
|
+
selection: summarizeFabricObjectForResizeDebug(activeObj),
|
|
14672
|
+
activeObjectIds: activeObjects.map((candidate) => getObjectId(candidate)),
|
|
14673
|
+
selectedStoreIds: useEditorStore.getState().canvas.selectedIds,
|
|
14674
|
+
members: activeObjects.map((candidate) => summarizeFabricObjectForResizeDebug(candidate))
|
|
14675
|
+
});
|
|
14676
|
+
}
|
|
14541
14677
|
if (debugGroupTextCornerResize) {
|
|
14542
14678
|
logGroupTextResizeDebug("modified-start", {
|
|
14543
14679
|
time: Math.round(performance.now()),
|
|
@@ -14793,11 +14929,17 @@ const PageCanvas = forwardRef(
|
|
|
14793
14929
|
absoluteTop = (decomposed.translateY ?? absoluteTop ?? 0) - w / 2 * Math.sin(angleRad) - h / 2 * Math.cos(angleRad);
|
|
14794
14930
|
}
|
|
14795
14931
|
} else if (obj instanceof fabric.FabricImage && (obj.originX === "center" || obj.originY === "center")) {
|
|
14796
|
-
|
|
14797
|
-
|
|
14798
|
-
|
|
14799
|
-
|
|
14800
|
-
|
|
14932
|
+
if (isActiveSelection && activeObj instanceof fabric.ActiveSelection) {
|
|
14933
|
+
const frameBounds = getObjectFrameBoundsInSelection(activeObj, obj, obj.width ?? 0, obj.height ?? 0);
|
|
14934
|
+
absoluteLeft = frameBounds.left;
|
|
14935
|
+
absoluteTop = frameBounds.top;
|
|
14936
|
+
} else {
|
|
14937
|
+
const w = (obj.width ?? 0) * (obj.scaleX ?? 1);
|
|
14938
|
+
const h = (obj.height ?? 0) * (obj.scaleY ?? 1);
|
|
14939
|
+
const angleRad = (decomposed.angle ?? obj.angle ?? 0) * Math.PI / 180;
|
|
14940
|
+
absoluteLeft = (decomposed.translateX ?? absoluteLeft ?? 0) - w / 2 * Math.cos(angleRad) + h / 2 * Math.sin(angleRad);
|
|
14941
|
+
absoluteTop = (decomposed.translateY ?? absoluteTop ?? 0) - w / 2 * Math.sin(angleRad) - h / 2 * Math.cos(angleRad);
|
|
14942
|
+
}
|
|
14801
14943
|
}
|
|
14802
14944
|
const preserveCornerGeometry = (sourceElement == null ? void 0 : sourceElement.type) === "shape" && (sourceElement.shapeType === "circle" || sourceElement.shapeType === "rounded-rect" || sourceElement.shapeType === "triangle");
|
|
14803
14945
|
let finalWidth = intrinsicWidth;
|
|
@@ -14886,6 +15028,7 @@ const PageCanvas = forwardRef(
|
|
|
14886
15028
|
useEditorStore.getState().updateElement(objId, { src: newSrc }, { recordHistory: false, skipLayoutRecalc: true });
|
|
14887
15029
|
}
|
|
14888
15030
|
} else if (isActiveSelection && (Math.abs((decomposed.scaleX ?? 1) - 1) > 1e-3 || Math.abs((decomposed.scaleY ?? 1) - 1) > 1e-3)) {
|
|
15031
|
+
const debugImageBeforeBake = debugGroupImageSideResize ? summarizeFabricObjectForResizeDebug(obj) : null;
|
|
14889
15032
|
const sx = Math.abs(decomposed.scaleX || 1);
|
|
14890
15033
|
const sy = Math.abs(decomposed.scaleY || 1);
|
|
14891
15034
|
const handle = activeSelectionResizeHandle;
|
|
@@ -14956,6 +15099,38 @@ const PageCanvas = forwardRef(
|
|
|
14956
15099
|
skewX: finalSkewX ?? 0,
|
|
14957
15100
|
skewY: finalSkewY ?? 0
|
|
14958
15101
|
});
|
|
15102
|
+
if (debugGroupImageSideResize) {
|
|
15103
|
+
logGroupImageResizeDebug("image-bake", {
|
|
15104
|
+
time: Math.round(performance.now()),
|
|
15105
|
+
handle: activeSelectionResizeHandle,
|
|
15106
|
+
imageId: objId,
|
|
15107
|
+
source: sourceElement ? {
|
|
15108
|
+
left: sourceElement.left,
|
|
15109
|
+
top: sourceElement.top,
|
|
15110
|
+
width: sourceElement.width,
|
|
15111
|
+
height: sourceElement.height,
|
|
15112
|
+
angle: sourceElement.angle,
|
|
15113
|
+
scaleX: sourceElement.scaleX,
|
|
15114
|
+
scaleY: sourceElement.scaleY
|
|
15115
|
+
} : null,
|
|
15116
|
+
factors: { sx, sy, fx, fy, isCornerHandle },
|
|
15117
|
+
beforeBake: debugImageBeforeBake,
|
|
15118
|
+
afterBake: summarizeFabricObjectForResizeDebug(obj),
|
|
15119
|
+
persistedGeometry: {
|
|
15120
|
+
absoluteLeft,
|
|
15121
|
+
absoluteTop,
|
|
15122
|
+
finalWidth,
|
|
15123
|
+
finalHeight,
|
|
15124
|
+
finalScaleX,
|
|
15125
|
+
finalScaleY,
|
|
15126
|
+
finalAngle,
|
|
15127
|
+
finalSkewX,
|
|
15128
|
+
finalSkewY,
|
|
15129
|
+
decomposed,
|
|
15130
|
+
finalAbsoluteMatrix
|
|
15131
|
+
}
|
|
15132
|
+
});
|
|
15133
|
+
}
|
|
14959
15134
|
} else {
|
|
14960
15135
|
finalWidth = intrinsicWidth;
|
|
14961
15136
|
finalHeight = intrinsicHeight;
|
|
@@ -15173,6 +15348,16 @@ const PageCanvas = forwardRef(
|
|
|
15173
15348
|
objectBeforeStoreWrite: summarizeFabricObjectForResizeDebug(obj)
|
|
15174
15349
|
});
|
|
15175
15350
|
}
|
|
15351
|
+
if (debugGroupImageSideResize && isGroupResizeImageLikeObject(obj)) {
|
|
15352
|
+
logGroupImageResizeDebug("store-update-image", {
|
|
15353
|
+
time: Math.round(performance.now()),
|
|
15354
|
+
handle: activeSelectionResizeHandle,
|
|
15355
|
+
imageId: objId,
|
|
15356
|
+
storePos,
|
|
15357
|
+
elementUpdate,
|
|
15358
|
+
objectBeforeStoreWrite: summarizeFabricObjectForResizeDebug(obj)
|
|
15359
|
+
});
|
|
15360
|
+
}
|
|
15176
15361
|
updateElement(objId, elementUpdate, { recordHistory: false, skipLayoutRecalc: true });
|
|
15177
15362
|
obj.setCoords();
|
|
15178
15363
|
}
|
|
@@ -15203,6 +15388,16 @@ const PageCanvas = forwardRef(
|
|
|
15203
15388
|
renderOnAddRemove: fabricCanvas.renderOnAddRemove
|
|
15204
15389
|
});
|
|
15205
15390
|
}
|
|
15391
|
+
if (debugGroupImageSideResize) {
|
|
15392
|
+
logGroupImageResizeDebug("before-reselect", {
|
|
15393
|
+
time: Math.round(performance.now()),
|
|
15394
|
+
handle: activeSelectionResizeHandle,
|
|
15395
|
+
wasGroupSel,
|
|
15396
|
+
selection: summarizeFabricObjectForResizeDebug(activeObj),
|
|
15397
|
+
members: membersToReselect.map((member) => summarizeFabricObjectForResizeDebug(member)),
|
|
15398
|
+
renderOnAddRemove: fabricCanvas.renderOnAddRemove
|
|
15399
|
+
});
|
|
15400
|
+
}
|
|
15206
15401
|
const prevRenderOnAddRemove = fabricCanvas.renderOnAddRemove;
|
|
15207
15402
|
fabricCanvas.renderOnAddRemove = false;
|
|
15208
15403
|
skipSelectionClearOnDiscardRef.current = true;
|
|
@@ -15247,6 +15442,16 @@ const PageCanvas = forwardRef(
|
|
|
15247
15442
|
renderOnAddRemove: fabricCanvas.renderOnAddRemove
|
|
15248
15443
|
});
|
|
15249
15444
|
}
|
|
15445
|
+
if (debugGroupImageSideResize) {
|
|
15446
|
+
logGroupImageResizeDebug("after-reselect", {
|
|
15447
|
+
time: Math.round(performance.now()),
|
|
15448
|
+
handle: activeSelectionResizeHandle,
|
|
15449
|
+
wasGroupSel,
|
|
15450
|
+
selection: summarizeFabricObjectForResizeDebug(newSel),
|
|
15451
|
+
members: membersToReselect.map((member) => summarizeFabricObjectForResizeDebug(member)),
|
|
15452
|
+
renderOnAddRemove: fabricCanvas.renderOnAddRemove
|
|
15453
|
+
});
|
|
15454
|
+
}
|
|
15250
15455
|
} else if (membersToReselect.length === 1) {
|
|
15251
15456
|
fabricCanvas.setActiveObject(membersToReselect[0]);
|
|
15252
15457
|
}
|
|
@@ -24296,9 +24501,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24296
24501
|
}
|
|
24297
24502
|
return svgString;
|
|
24298
24503
|
}
|
|
24299
|
-
const resolvedPackageVersion = "0.5.
|
|
24504
|
+
const resolvedPackageVersion = "0.5.333";
|
|
24300
24505
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24301
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24506
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.333";
|
|
24302
24507
|
const roundParityValue = (value) => {
|
|
24303
24508
|
if (typeof value !== "number") return value;
|
|
24304
24509
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25112,7 +25317,7 @@ class PixldocsRenderer {
|
|
|
25112
25317
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25113
25318
|
}
|
|
25114
25319
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25115
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25320
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BSV5NYSE.js");
|
|
25116
25321
|
const prepared = preparePagesForExport(
|
|
25117
25322
|
cloned.pages,
|
|
25118
25323
|
canvasWidth,
|
|
@@ -27432,7 +27637,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27432
27637
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27433
27638
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27434
27639
|
try {
|
|
27435
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27640
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BSV5NYSE.js");
|
|
27436
27641
|
try {
|
|
27437
27642
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27438
27643
|
} catch {
|
|
@@ -27832,4 +28037,4 @@ export {
|
|
|
27832
28037
|
buildTeaserBlurFlatKeys as y,
|
|
27833
28038
|
collectFontDescriptorsFromConfig as z
|
|
27834
28039
|
};
|
|
27835
|
-
//# sourceMappingURL=index-
|
|
28040
|
+
//# sourceMappingURL=index-CAdMLx_E.js.map
|