Added auto prevent default variable to pixi constants

This commit is contained in:
Mat Groves 2014-01-24 17:41:44 +00:00
parent d0109051f9
commit 951f1049ec
2 changed files with 7 additions and 1 deletions

View file

@ -315,6 +315,8 @@ PIXI.InteractionManager.prototype.onMouseDown = function(event)
{
this.mouse.originalEvent = event || window.event; //IE uses window.event
if(PIXI.AUTO_PREVENT_DEFULT)this.mouse.originalEvent.preventDefault();
// loop through interaction tree...
// hit test each item! ->
// get interactive items under point??
@ -374,6 +376,7 @@ PIXI.InteractionManager.prototype.onMouseOut = function()
*/
PIXI.InteractionManager.prototype.onMouseUp = function(event)
{
this.mouse.originalEvent = event || window.event; //IE uses window.event
var length = this.interactiveItems.length;
@ -538,6 +541,8 @@ PIXI.InteractionManager.prototype.onTouchStart = function(event)
{
var rect = this.interactionDOMElement.getBoundingClientRect();
if(PIXI.AUTO_PREVENT_DEFULT)event.preventDefault();
var changedTouches = event.changedTouches;
for (var i=0; i < changedTouches.length; i++)
{

View file

@ -42,4 +42,5 @@ PIXI.scaleModes = {
};
// interaction frequancy
PIXI.INTERACTION_FREQUENCY = 30;
PIXI.INTERACTION_FREQUENCY = 30;
PIXI.AUTO_PREVENT_DEFULT = true;