pick up IE events

This commit is contained in:
Chad Engler 2013-06-23 08:42:06 -07:00
parent efc96d9c90
commit bc48d1f992

View file

@ -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;