0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-23 09:26:51 -05:00

fix missing mouse.sourceEvents.mousewheel, closes #1146

This commit is contained in:
liabru 2023-03-18 11:15:12 +00:00
parent 8dd0e99b79
commit 272049ab05

View file

@ -100,6 +100,7 @@ var Common = require('../core/Common');
mouse.mousewheel = function(event) { mouse.mousewheel = function(event) {
mouse.wheelDelta = Math.max(-1, Math.min(1, event.wheelDelta || -event.detail)); mouse.wheelDelta = Math.max(-1, Math.min(1, event.wheelDelta || -event.detail));
event.preventDefault(); event.preventDefault();
mouse.sourceEvents.mousewheel = event;
}; };
Mouse.setElement(mouse, mouse.element); Mouse.setElement(mouse, mouse.element);