changed it to zoom to fit to container initially regardless of size sinze with the button its easy to get to the natural size, and it helps for sending pixelart

This commit is contained in:
Shea Duma committed 2026-05-16 14:00:14 +03:00
1 parent b3c4edcead
commit fde563e46e
1 file changed
+1 -1
+1 -1
View File
@@ -236,7 +236,7 @@ export const useImageGestures = (active: boolean, step = 0.2, min = 0.1, max = 5
}
const heightRatio = height / img.naturalHeight;
const widthRatio = width / img.naturalWidth;
const fitZoom = Math.min(heightRatio, widthRatio, 1);
const fitZoom = Math.min(heightRatio, widthRatio);
img.style.transition = 'none';
setFitRatio(fitZoom);