frame.image 1.6.7 → 1.6.8
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/Designer.d.ts +1 -1
- package/dist/Designer.js +2 -2
- package/dist/DrawCanvas.d.ts.map +1 -1
- package/dist/DrawCanvas.js +10 -1
- package/dist/ModalDesigner.js +1 -1
- package/package.json +1 -1
package/dist/Designer.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare function Designer(props: {
|
|
|
4
4
|
onClose: (rt1: string) => void;
|
|
5
5
|
nrPoints?: number;
|
|
6
6
|
trademarkImageUrl?: string;
|
|
7
|
-
|
|
7
|
+
callbackAfterTransform?: (coordinates: Polygon) => void;
|
|
8
8
|
callbackAfterScale?: (length: number, height: number) => void;
|
|
9
9
|
callbackAfterTrademark?: (tradeMark: Point) => void;
|
|
10
10
|
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/Designer.js
CHANGED
|
@@ -85,8 +85,8 @@ export function Designer(props) {
|
|
|
85
85
|
const onAfterTransform = (coordinates) => {
|
|
86
86
|
setScalingEnabled(true);
|
|
87
87
|
sendCommand(ACTION.TRANSFORM);
|
|
88
|
-
if (props.
|
|
89
|
-
props.
|
|
88
|
+
if (props.callbackAfterTransform) {
|
|
89
|
+
props.callbackAfterTransform(coordinates);
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
92
|
const onReset = () => {
|
package/dist/DrawCanvas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawCanvas.d.ts","sourceRoot":"","sources":["../src/DrawCanvas.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqD,MAAM,OAAO,CAAC;AAG/E,OAAO,EACL,SAAS,EACT,WAAW,EACX,UAAU,EACV,aAAa,EACb,KAAK,EACL,WAAW,EACX,cAAc,EACf,MAAM,SAAS,CAAC;AAKjB,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAChC,OAAO,EAA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,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,GAAG,GAAG,CAAC,OAAO,CA8rBd"}
|
package/dist/DrawCanvas.js
CHANGED
|
@@ -98,7 +98,16 @@ export function DrawCanvas(props) {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
if (props.show.catmullRom) {
|
|
101
|
-
|
|
101
|
+
try {
|
|
102
|
+
sortedPoints.drawCatmullRom(context);
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
console.error('Error drawing Catmull-Rom curve:', error);
|
|
106
|
+
console.error('SortedPoints content:', {
|
|
107
|
+
props: props.coords.coords.Points.map((p) => ({ X: p.X, Y: p.Y })),
|
|
108
|
+
});
|
|
109
|
+
// Handle the error gracefully - continue with other drawing operations
|
|
110
|
+
}
|
|
102
111
|
}
|
|
103
112
|
if (props.machine.name === STATUS.FORM_SCALED) {
|
|
104
113
|
// const trademarkPolygon = props.coords.coords.scale(0.9, 0.9);
|
package/dist/ModalDesigner.js
CHANGED
|
@@ -26,5 +26,5 @@ export function ModalDesigner(props) {
|
|
|
26
26
|
borderRadius: 2,
|
|
27
27
|
display: 'flex',
|
|
28
28
|
flexDirection: 'column',
|
|
29
|
-
}, children: _jsx(Designer, { onClose: props.onClose, nrPoints: 128,
|
|
29
|
+
}, children: _jsx(Designer, { onClose: props.onClose, nrPoints: 128, callbackAfterTransform: logPolygon, callbackAfterScale: logScaling, callbackAfterTrademark: logTrademark }) }) }));
|
|
30
30
|
}
|