From 62aa9edc14008457da0bac0d9158583f4d0cde86 Mon Sep 17 00:00:00 2001 From: Brandon Dyck Date: Mon, 22 Jul 2024 15:18:56 -0600 Subject: [PATCH] Zoom evenly at a sensible rate --- panorama-viewer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panorama-viewer.js b/panorama-viewer.js index 0ff5b76..9a75c76 100644 --- a/panorama-viewer.js +++ b/panorama-viewer.js @@ -186,7 +186,7 @@ let zoom = 3; viewer.addEventListener("wheel", (evt) => { console.log(evt.deltaY); - zoom = Math.max(zoom + evt.deltaY * 0.75, minZoom); + zoom = Math.max(zoom * (1 - evt.deltaY * 0.005), minZoom); evt.preventDefault(); });