WebGL Render Bug Fix

This commit is contained in:
Mat Groves 2013-06-24 15:32:52 +01:00
parent 953a19ff5c
commit c6e6f7458e
36 changed files with 729 additions and 340 deletions

View file

@ -337,6 +337,7 @@ PIXI.InteractionManager.prototype.update = function()
PIXI.InteractionManager.prototype.onMouseMove = function(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();
@ -362,6 +363,7 @@ PIXI.InteractionManager.prototype.onMouseMove = function(event)
PIXI.InteractionManager.prototype.onMouseDown = function(event)
{
event.preventDefault();
this.mouse.originalEvent = event || window.event; //IE uses window.event
// loop through inteaction tree...
// hit test each item! ->
@ -399,7 +401,7 @@ PIXI.InteractionManager.prototype.onMouseDown = function(event)
PIXI.InteractionManager.prototype.onMouseUp = function(event)
{
this.mouse.originalEvent = event || window.event; //IE uses window.event
var global = this.mouse.global;
@ -532,6 +534,7 @@ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData)
PIXI.InteractionManager.prototype.onTouchMove = function(event)
{
this.mouse.originalEvent = event || window.event; //IE uses window.event
var rect = this.target.view.getBoundingClientRect();
var changedTouches = event.changedTouches;
@ -556,6 +559,7 @@ PIXI.InteractionManager.prototype.onTouchMove = function(event)
PIXI.InteractionManager.prototype.onTouchStart = function(event)
{
event.preventDefault();
this.mouse.originalEvent = event || window.event; //IE uses window.event
var rect = this.target.view.getBoundingClientRect();
@ -598,6 +602,7 @@ PIXI.InteractionManager.prototype.onTouchStart = function(event)
PIXI.InteractionManager.prototype.onTouchEnd = function(event)
{
this.mouse.originalEvent = event || window.event; //IE uses window.event
var rect = this.target.view.getBoundingClientRect();
var changedTouches = event.changedTouches;
@ -682,6 +687,13 @@ PIXI.InteractionData = function()
* @type Sprite
*/
this.target;
/**
* When passed to an event handler, this will be the original DOM Event that was captured
* @property originalEvent
* @type Event
*/
this.originalEvent;
}
/**