0
votes

In a stage I am having a group I am performing various functions on the group such as adding line,text and dragging the group rotating etc. Is their any way to get the mouse position related to group not to the stage.

Ex- I mean If I rotate the group and then if i try to draw the line using the mouse co-ordinates it is drawing according to the stage co-ordinates.

1
You might just have to calculate mouse coordinates. - SoluableNonagon

1 Answers

0
votes
 var mousePos = stage.getMousePosition();
 var shapePos = shape.getPosition();
 var relativePos = mousePos - shapePos;

would get you a relative position.