apsavin/jCanvaScript — pull request #7 by amaduki (2012-05-03 15:32:58+00:00)
Title: Fixed argument of callback function in "mousemove" event

When binding mousemove events to image, imgdata or text object,
argument of callback function has wrong coordinates.

reproduction code

var a=jc.text("textobject",50,50).color("#0000FF");

a.translateTo(100,50);

a.mousemove(function(point){console.log("d mousemove (x:" + point.x + " y:" + point.y + ")")});

a.mousedown(function(point){console.log("d mousedown (x:" + point.x + " y:" + point.y + ")")});

When moving mousecursor to the upper left of text, cursor is in (100,50) but logging message shows (50,50). It seems back calculated by layer and object transform matrix.

attention

Till now, isPointIn() method of image, imgdata and text object returns "back calculated" coordinates.
and when this amendment is applied that method will return "untouched" value.
(This is same action that calling isPointIn() method of any other objects)