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:
parent
8dd0e99b79
commit
272049ab05
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue