1
0
mirror of https://github.com/upscayl/upscayl.git synced 2025-02-15 10:22:37 +01:00

Update function

This commit is contained in:
Nayam Amarshe 2024-10-04 14:36:09 +05:30
parent 04cd625010
commit 31aa0f91e1

View File

@ -10,10 +10,10 @@ const ImageViewer = ({
return ( return (
<img <img
src={"file:///" + sanitizePath(imagePath)} src={"file:///" + sanitizePath(imagePath)}
onLoad={(e: any) => { onLoad={(e: React.SyntheticEvent<HTMLImageElement>) => {
setDimensions({ setDimensions({
width: e.target.naturalWidth, width: e.currentTarget.naturalWidth,
height: e.target.naturalHeight, height: e.currentTarget.naturalHeight,
}); });
}} }}
draggable="false" draggable="false"