diff --git a/src/interaction/InteractionData.js b/src/interaction/InteractionData.js index 9775971..d0131ff 100644 --- a/src/interaction/InteractionData.js +++ b/src/interaction/InteractionData.js @@ -43,19 +43,5 @@ */ InteractionData.prototype.getLocalPosition = function (displayObject, point, globalPos) { - var worldTransform = displayObject.worldTransform; - var global = globalPos ? globalPos : this.global; - - // do a cheeky transform to get the mouse coords; - var a00 = worldTransform.a, a01 = worldTransform.c, a02 = worldTransform.tx, - a10 = worldTransform.b, a11 = worldTransform.d, a12 = worldTransform.ty, - id = 1 / (a00 * a11 + a01 * -a10); - - point = point || new core.Point(); - - point.x = a11 * id * global.x + -a01 * id * global.x + (a12 * a01 - a02 * a11) * id; - point.y = a00 * id * global.y + -a10 * id * global.y + (-a12 * a00 + a02 * a10) * id; - - // set the mouse coords... - return point; + return displayObject.toLocal(globalPos ? globalPos : this.global, point); };