From bc48d1f99237a5cec4b5401bc29e0b70a373960c Mon Sep 17 00:00:00 2001 From: Chad Engler Date: Sun, 23 Jun 2013 08:42:06 -0700 Subject: [PATCH] pick up IE events --- src/pixi/InteractionManager.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index 9c2fbfc..6373e86 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -193,7 +193,7 @@ PIXI.InteractionManager.prototype.update = function() PIXI.InteractionManager.prototype.onMouseMove = function(event) { - this.mouse.originalEvent = event; + this.mouse.originalEvent = event || window.event; //IE uses window.event // TODO optimize by not check EVERY TIME! maybe half as often? // var rect = this.target.view.getBoundingClientRect(); @@ -219,7 +219,7 @@ PIXI.InteractionManager.prototype.onMouseMove = function(event) PIXI.InteractionManager.prototype.onMouseDown = function(event) { event.preventDefault(); - this.mouse.originalEvent = event; + this.mouse.originalEvent = event || window.event; //IE uses window.event // loop through inteaction tree... // hit test each item! -> @@ -257,7 +257,7 @@ PIXI.InteractionManager.prototype.onMouseDown = function(event) PIXI.InteractionManager.prototype.onMouseUp = function(event) { - this.mouse.originalEvent = event; + this.mouse.originalEvent = event || window.event; //IE uses window.event var global = this.mouse.global; @@ -390,7 +390,7 @@ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) PIXI.InteractionManager.prototype.onTouchMove = function(event) { - this.mouse.originalEvent = event; + this.mouse.originalEvent = event || window.event; //IE uses window.event var rect = this.target.view.getBoundingClientRect(); var changedTouches = event.changedTouches; @@ -415,7 +415,7 @@ PIXI.InteractionManager.prototype.onTouchMove = function(event) PIXI.InteractionManager.prototype.onTouchStart = function(event) { event.preventDefault(); - this.mouse.originalEvent = event; + this.mouse.originalEvent = event || window.event; //IE uses window.event var rect = this.target.view.getBoundingClientRect(); @@ -458,7 +458,7 @@ PIXI.InteractionManager.prototype.onTouchStart = function(event) PIXI.InteractionManager.prototype.onTouchEnd = function(event) { - this.mouse.originalEvent = event; + this.mouse.originalEvent = event || window.event; //IE uses window.event var rect = this.target.view.getBoundingClientRect(); var changedTouches = event.changedTouches;