Added Stage.getMousePosition()
Directly returns a more sane path to the Stage.interactionManager.mouse.global point object that contains the mouse's coords.
This commit is contained in:
parent
a1faefe5c7
commit
7ec6c14e65
1 changed files with 10 additions and 0 deletions
|
@ -68,6 +68,16 @@ PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor)
|
|||
this.backgroundColorString = "#" + this.backgroundColor.toString(16);
|
||||
}
|
||||
|
||||
/**
|
||||
* This will return the point containing global coords of the mouse.
|
||||
* @method getMousePosition
|
||||
* @return {Point} The point containing the coords of the global InteractionData position.
|
||||
*/
|
||||
PIXI.Stage.prototype.getMousePosition = function()
|
||||
{
|
||||
return this.interactionManager.mouse.global;
|
||||
}
|
||||
|
||||
PIXI.Stage.prototype.__addChild = function(child)
|
||||
{
|
||||
if(child.interactive)this.dirty = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue