mirror of
https://github.com/liabru/matter-js.git
synced 2024-12-26 13:49:01 -05:00
fixed issue with Matter.Mouse
This commit is contained in:
parent
3750bfc719
commit
77168e5faf
1 changed files with 10 additions and 3 deletions
|
@ -36,7 +36,8 @@ var Mouse;
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
mouse.position = position;
|
mouse.position.x = position.x;
|
||||||
|
mouse.position.y = position.y;
|
||||||
mouse.sourceEvents.mousemove = event;
|
mouse.sourceEvents.mousemove = event;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -51,7 +52,10 @@ var Mouse;
|
||||||
mouse.button = event.button;
|
mouse.button = event.button;
|
||||||
}
|
}
|
||||||
|
|
||||||
mouse.position = mouse.mousedownPosition = position;
|
mouse.position.x = position.x;
|
||||||
|
mouse.position.y = position.y;
|
||||||
|
mouse.mousedownPosition.x = position.x;
|
||||||
|
mouse.mousedownPosition.y = position.y;
|
||||||
mouse.sourceEvents.mousedown = event;
|
mouse.sourceEvents.mousedown = event;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -64,7 +68,10 @@ var Mouse;
|
||||||
}
|
}
|
||||||
|
|
||||||
mouse.button = -1;
|
mouse.button = -1;
|
||||||
mouse.position = mouse.mouseupPosition = position;
|
mouse.position.x = position.x;
|
||||||
|
mouse.position.y = position.y;
|
||||||
|
mouse.mouseupPosition.x = position.x;
|
||||||
|
mouse.mouseupPosition.y = position.y;
|
||||||
mouse.sourceEvents.mouseup = event;
|
mouse.sourceEvents.mouseup = event;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue