Tweaked interaction manager to handle mouse leave events better
This commit is contained in:
parent
a1091473ec
commit
c2cf3f264c
2 changed files with 9 additions and 2 deletions
|
@ -61,6 +61,8 @@ PIXI.InteractionManager = function(stage)
|
|||
this.last = 0;
|
||||
|
||||
this.currentCursorStyle = 'inherit';
|
||||
|
||||
this.mouseOut = false;
|
||||
};
|
||||
|
||||
// constructor
|
||||
|
@ -386,7 +388,6 @@ PIXI.InteractionManager.prototype.onMouseOut = function()
|
|||
for (var i = 0; i < length; i++)
|
||||
{
|
||||
var item = this.interactiveItems[i];
|
||||
|
||||
if(item.__isOver)
|
||||
{
|
||||
this.mouse.target = item;
|
||||
|
@ -394,6 +395,12 @@ PIXI.InteractionManager.prototype.onMouseOut = function()
|
|||
item.__isOver = false;
|
||||
}
|
||||
}
|
||||
|
||||
this.mouseOut = true;
|
||||
|
||||
// move the mouse to an impossible position
|
||||
this.mouse.global.x = -10000;
|
||||
this.mouse.global.y = -10000;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -61,7 +61,7 @@ PIXI.JsonLoader.prototype.constructor = PIXI.JsonLoader;
|
|||
* @method load
|
||||
*/
|
||||
PIXI.JsonLoader.prototype.load = function () {
|
||||
this.ajaxRequest = new PIXI.AjaxRequest();
|
||||
this.ajaxRequest = new PIXI.AjaxRequest(this.crossorigin);
|
||||
var scope = this;
|
||||
this.ajaxRequest.onreadystatechange = function () {
|
||||
scope.onJSONLoaded();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue