frame.image 1.6.3 → 1.6.4
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 -0
- package/dist/Designer.d.ts.map +1 -1
- package/dist/Designer.js +1 -1
- package/dist/DrawCanvas.d.ts +1 -0
- package/dist/DrawCanvas.d.ts.map +1 -1
- package/dist/DrawCanvas.js +10 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/package.json +1 -1
package/dist/Designer.d.ts
CHANGED
package/dist/Designer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Designer.d.ts","sourceRoot":"","sources":["../src/Designer.tsx"],"names":[],"mappings":"AAeA,wBAAgB,QAAQ,CAAC,KAAK,EAAE;IAC9B,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Designer.d.ts","sourceRoot":"","sources":["../src/Designer.tsx"],"names":[],"mappings":"AAeA,wBAAgB,QAAQ,CAAC,KAAK,EAAE;IAC9B,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,2CAgRA"}
|
package/dist/Designer.js
CHANGED
|
@@ -146,7 +146,7 @@ export function Designer(props) {
|
|
|
146
146
|
height: '100%',
|
|
147
147
|
boxSizing: 'border-box',
|
|
148
148
|
backgroundColor: 'rgb(173, 216, 230)', // lightblue in rgb
|
|
149
|
-
}, children: _jsx(DrawCanvas, { machine: currentMachine, command: sendCommand, width: width, height: height, status: { status, setStatus }, show: show, axis: { axis, setAxis }, imageUrl: imageUrl, coords: { coords, setCoords }, trademarkCenter: { trademarkCenter, setTrademarkCenter }, imageCoords: { imageCoords, setImageCoords }, rotation: { rotationAngle, setRotationAngle }, scaledSL: scaledSL, scaledSH: scaledSH, catmullRomPoints: { catmullRomPoints, setCatmullRomPoints } }) }), _jsx(Box, { id: "id.box.ScaleForm", sx: {
|
|
149
|
+
}, children: _jsx(DrawCanvas, { machine: currentMachine, command: sendCommand, width: width, height: height, status: { status, setStatus }, show: show, axis: { axis, setAxis }, imageUrl: imageUrl, coords: { coords, setCoords }, trademarkCenter: { trademarkCenter, setTrademarkCenter }, imageCoords: { imageCoords, setImageCoords }, rotation: { rotationAngle, setRotationAngle }, scaledSL: scaledSL, scaledSH: scaledSH, catmullRomPoints: { catmullRomPoints, setCatmullRomPoints }, trademarkImageUrl: props.trademarkImageUrl }) }), _jsx(Box, { id: "id.box.ScaleForm", sx: {
|
|
150
150
|
display: 'flex',
|
|
151
151
|
flexDirection: 'column',
|
|
152
152
|
flex: wCol3,
|
package/dist/DrawCanvas.d.ts
CHANGED
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,qBAAqB,EACrB,WAAW,EACX,UAAU,EACV,aAAa,EACb,KAAK,EACL,WAAW,EACX,cAAc,EACf,MAAM,SAAS,CAAC;AAKjB,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAChC,OAAO,EAAE,GAAG,CAAC;IACb,OAAO,EAAE,GAAG,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,eAAe,EAAE,cAAc,CAAC;IAChC,gBAAgB,EAAE,qBAAqB,CAAC;IACxC,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;
|
|
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,qBAAqB,EACrB,WAAW,EACX,UAAU,EACV,aAAa,EACb,KAAK,EACL,WAAW,EACX,cAAc,EACf,MAAM,SAAS,CAAC;AAKjB,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAChC,OAAO,EAAE,GAAG,CAAC;IACb,OAAO,EAAE,GAAG,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,eAAe,EAAE,cAAc,CAAC;IAChC,gBAAgB,EAAE,qBAAqB,CAAC;IACxC,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,GAAG,GAAG,CAAC,OAAO,CAysBd"}
|
package/dist/DrawCanvas.js
CHANGED
|
@@ -199,11 +199,16 @@ export function DrawCanvas(props) {
|
|
|
199
199
|
const loadTrademarkImage = useCallback((onLoad) => {
|
|
200
200
|
const newImg = new window.Image();
|
|
201
201
|
newImg.onload = () => onLoad(newImg);
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
202
|
+
newImg.onerror = () => console.warn('Failed to load trademark image');
|
|
203
|
+
if (props.trademarkImageUrl) {
|
|
204
|
+
// Use the URL provided by the external program
|
|
205
|
+
newImg.src = props.trademarkImageUrl;
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
// Fallback to default asset path for backward compatibility
|
|
209
|
+
newImg.src = new URL('../assets/rlogo.gif', import.meta.url).href;
|
|
210
|
+
}
|
|
211
|
+
}, [props.trademarkImageUrl]);
|
|
207
212
|
// Split drawImageBackground into two functions: loadImage and drawImageBackground
|
|
208
213
|
const loadImage = useCallback((src, onLoad) => {
|
|
209
214
|
const newImg = new window.Image();
|
package/dist/index.d.ts
CHANGED
|
@@ -10,5 +10,6 @@ export { TCoordsHook, TStatusHook, TShowHook, TAxisHook, TMouseCoordsHook, TImag
|
|
|
10
10
|
export { Polygon } from './Polygon';
|
|
11
11
|
export { Point } from './Point';
|
|
12
12
|
export { rlogo };
|
|
13
|
+
export declare function getTrademarkImageUrl(): string;
|
|
13
14
|
export declare function loadTrademarkImage(): Promise<HTMLImageElement>;
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,yBAAyB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAA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O9D"}
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,10 @@ export { States } from './States';
|
|
|
9
9
|
export { Polygon } from './Polygon';
|
|
10
10
|
export { Point } from './Point';
|
|
11
11
|
export { rlogo };
|
|
12
|
+
// Get the trademark image URL for external programs
|
|
13
|
+
export function getTrademarkImageUrl() {
|
|
14
|
+
return rlogo;
|
|
15
|
+
}
|
|
12
16
|
// Utility function to load the Rodenstock trademark image
|
|
13
17
|
export function loadTrademarkImage() {
|
|
14
18
|
return new Promise((resolve, reject) => {
|