Skip to content

Commit eb9f303

Browse files
committed
fix zoom
1 parent 6848edd commit eb9f303

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3011,7 +3011,7 @@ function App() {
30113011
targetZoomPercent = zoomValue / dpr;
30123012
}
30133013

3014-
targetZoomPercent = Math.max(0.1 / dpr, Math.min(2.0 / dpr, targetZoomPercent));
3014+
targetZoomPercent = Math.max(0.1 / dpr, Math.min(2.0, targetZoomPercent));
30153015

30163016
let transformZoom = 1.0;
30173017
if (

src/components/panel/Editor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ export default function Editor({
335335
const maxScale = (2.0 / dpr) * scaleFor100Percent;
336336

337337
return {
338-
minScale,
339-
maxScale,
338+
minScale: Math.max(0.1, minScale),
339+
maxScale: Math.max(20, maxScale),
340340
};
341341
}, [selectedImage, imageRenderSize.scale, originalSize]);
342342

0 commit comments

Comments
 (0)