From 2670fbb1e8274c378a1f5eb1d6f60340122cbd20 Mon Sep 17 00:00:00 2001 From: trafficlunar Date: Sat, 7 Dec 2024 16:06:27 +0000 Subject: [PATCH] fix: make zooming consistent at all scale levels --- src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 623e151..08fd89d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -110,7 +110,7 @@ function App() { e.preventDefault(); const scaleChange = e.deltaY > 0 ? -0.1 : 0.1; - const newScale = Math.min(Math.max(scale + scaleChange, 0.25), 16); + const newScale = Math.min(Math.max(scale + (scaleChange * scale), 0.25), 32); setScale(newScale); setCoords({