Listen for "wheel", not "mousewheel"

Oops, I was using an unsupported browser event.
This commit is contained in:
Tyler Hallada 2018-07-05 22:49:25 -04:00
parent b350f1b271
commit 75791972c9

View File

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