Browse Source

Listen for "wheel", not "mousewheel"

Oops, I was using an unsupported browser event.
Tyler Hallada 5 years ago
parent
commit
75791972c9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      js/proximity.js

+ 2 - 2
js/proximity.js

@@ -828,9 +828,9 @@ function registerEventHandlers() {
828 828
 
829 829
     /* MOUSE AND TOUCH EVENTS */
830 830
 
831
-    window.addEventListener('mousewheel', function (e) {
831
+    window.addEventListener('wheel', function (e) {
832 832
         if (e.target.tagName !== 'CANVAS') return;
833
-        scrollDelta = scrollDelta + ((e.deltaY / 100) * 3);
833
+        scrollDelta = scrollDelta + e.deltaY;
834 834
     });
835 835
 
836 836
     window.addEventListener('touchstart', function (e) {