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