From bbedf24191bd3f760dd04c4e4a655df4a228e9cb Mon Sep 17 00:00:00 2001
From: Jakob Yanagibashi <jakob.yanagibashi@rwth-aachen.de>
Date: Thu, 13 Apr 2023 17:04:58 +0000
Subject: [PATCH] Reverse mouse wheel zoom

---
 main.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/main.js b/main.js
index 2b18db7..d8fe0ad 100644
--- a/main.js
+++ b/main.js
@@ -490,13 +490,13 @@ function initIllo() {
     e.preventDefault();
     // Zoom into: positive, Zoom out: negative, e.deltaY
     if (
-      (window.illo.scale.x < 2 && e.deltaY < 0) ||
-      (window.illo.scale.x > 80 && e.deltaY > 0)
+      (window.illo.scale.x < 2 && e.deltaY > 0) ||
+      (window.illo.scale.x > 80 && e.deltaY < 0)
     ) {
       return;
     }
     window.illo.scale.multiply(
-      1 + Math.max(Math.min(e.deltaY / 40, 0.9), -0.9)
+      1 - Math.max(Math.min(e.deltaY / 40, 0.9), -0.9)
     );
   });
   // Drag (move)
-- 
GitLab