@deepnoid/canvas 0.1.6 → 0.1.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/components/XrayViewer.js +1 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
|
@@ -149,6 +149,7 @@ const XrayViewer = ({ image, hasZoom, coordinates, onImageLoadError, onImageLoad
|
|
|
149
149
|
catch (error) {
|
|
150
150
|
const errorMessage = error instanceof Error ? error.message : 'Image load failed';
|
|
151
151
|
setImageError(errorMessage);
|
|
152
|
+
imageRef.current = new Image();
|
|
152
153
|
onImageLoadError?.(new Error(errorMessage));
|
|
153
154
|
console.error('Image load failed:', error);
|
|
154
155
|
}
|
|
@@ -257,8 +258,6 @@ const XrayViewer = ({ image, hasZoom, coordinates, onImageLoadError, onImageLoad
|
|
|
257
258
|
height: '100%',
|
|
258
259
|
left: 0,
|
|
259
260
|
top: 0,
|
|
260
|
-
transition: 'all 500ms',
|
|
261
|
-
opacity: isImageLoading || imageError ? 0.5 : 1,
|
|
262
261
|
} }), !isImageLoading && !imageError && (_jsx(Canvas, { moveX: moveX, moveY: moveY, zoomX: zoomX, zoomY: zoomY, zoom: zoom, dx: dx, dy: dy, dw: dw, dh: dh, coordinates: coordinates })), hasZoom && initZoom !== 0 && !isImageLoading && !imageError && (_jsx(hasZoom.ZoomButton, { onClick: initCanvas, children: `${Math.round((zoom / initZoom) * 100)}%` }))] }) }));
|
|
263
262
|
};
|
|
264
263
|
export default XrayViewer;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import XrayViewer from './components/XrayViewer';
|
|
2
|
+
export { XrayViewer };
|
|
2
3
|
export type { ZoomButtonType } from './components/XrayViewer';
|
|
3
4
|
export type { Rectangle, Coordinate } from './types/coordinate';
|
package/dist/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import XrayViewer from './components/XrayViewer';
|
|
2
|
+
export { XrayViewer };
|