From 77168e5faf5e4cc8389910960b5fb91f063dc20e Mon Sep 17 00:00:00 2001 From: liabru Date: Thu, 1 May 2014 11:52:50 +0100 Subject: [PATCH] fixed issue with Matter.Mouse --- src/core/Mouse.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/core/Mouse.js b/src/core/Mouse.js index 929a4b7..8609ca9 100644 --- a/src/core/Mouse.js +++ b/src/core/Mouse.js @@ -36,7 +36,8 @@ var Mouse; event.preventDefault(); } - mouse.position = position; + mouse.position.x = position.x; + mouse.position.y = position.y; mouse.sourceEvents.mousemove = event; }; @@ -51,7 +52,10 @@ var Mouse; 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; }; @@ -64,7 +68,10 @@ var Mouse; } 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; };