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

changes to mouse events

This commit is contained in:
liabru 2014-03-14 20:05:02 +00:00
parent aabd202a9d
commit ec06592fcd

View file

@ -362,13 +362,13 @@ var Engine = {};
* *
* @event mousemove * @event mousemove
* @param {} event An event object * @param {} event An event object
* @param {MouseEvent} event.mouseEvent The native MouseEvent from the browser * @param {mouse} event.mouse The engine's mouse instance
* @param {} event.source The source object of the event * @param {} event.source The source object of the event
* @param {} event.name The name of the event * @param {} event.name The name of the event
*/ */
if (mouseEvents.mousemove) { if (mouseEvents.mousemove) {
Events.trigger(mouse, 'mousemove', { Events.trigger(engine, 'mousemove', {
mouseEvent: mouseEvents.mousemove mouse: mouse
}); });
} }
@ -377,13 +377,13 @@ var Engine = {};
* *
* @event mousedown * @event mousedown
* @param {} event An event object * @param {} event An event object
* @param {MouseEvent} event.mouseEvent The native MouseEvent from the browser * @param {mouse} event.mouse The engine's mouse instance
* @param {} event.source The source object of the event * @param {} event.source The source object of the event
* @param {} event.name The name of the event * @param {} event.name The name of the event
*/ */
if (mouseEvents.mousedown) { if (mouseEvents.mousedown) {
Events.trigger(mouse, 'mousedown', { Events.trigger(engine, 'mousedown', {
mouseEvent: mouseEvents.mousedown mouse: mouse
}); });
} }
@ -392,13 +392,13 @@ var Engine = {};
* *
* @event mouseup * @event mouseup
* @param {} event An event object * @param {} event An event object
* @param {MouseEvent} event.mouseEvent The native MouseEvent from the browser * @param {mouse} event.mouse The engine's mouse instance
* @param {} event.source The source object of the event * @param {} event.source The source object of the event
* @param {} event.name The name of the event * @param {} event.name The name of the event
*/ */
if (mouseEvents.mouseup) { if (mouseEvents.mouseup) {
Events.trigger(mouse, 'mouseup', { Events.trigger(engine, 'mouseup', {
mouseEvent: mouseEvents.mouseup mouse: mouse
}); });
} }