Added auto prevent default variable to pixi constants
This commit is contained in:
parent
d0109051f9
commit
951f1049ec
2 changed files with 7 additions and 1 deletions
|
@ -315,6 +315,8 @@ PIXI.InteractionManager.prototype.onMouseDown = function(event)
|
||||||
{
|
{
|
||||||
this.mouse.originalEvent = event || window.event; //IE uses window.event
|
this.mouse.originalEvent = event || window.event; //IE uses window.event
|
||||||
|
|
||||||
|
if(PIXI.AUTO_PREVENT_DEFULT)this.mouse.originalEvent.preventDefault();
|
||||||
|
|
||||||
// loop through interaction tree...
|
// loop through interaction tree...
|
||||||
// hit test each item! ->
|
// hit test each item! ->
|
||||||
// get interactive items under point??
|
// get interactive items under point??
|
||||||
|
@ -374,6 +376,7 @@ PIXI.InteractionManager.prototype.onMouseOut = function()
|
||||||
*/
|
*/
|
||||||
PIXI.InteractionManager.prototype.onMouseUp = function(event)
|
PIXI.InteractionManager.prototype.onMouseUp = function(event)
|
||||||
{
|
{
|
||||||
|
|
||||||
this.mouse.originalEvent = event || window.event; //IE uses window.event
|
this.mouse.originalEvent = event || window.event; //IE uses window.event
|
||||||
|
|
||||||
var length = this.interactiveItems.length;
|
var length = this.interactiveItems.length;
|
||||||
|
@ -538,6 +541,8 @@ PIXI.InteractionManager.prototype.onTouchStart = function(event)
|
||||||
{
|
{
|
||||||
var rect = this.interactionDOMElement.getBoundingClientRect();
|
var rect = this.interactionDOMElement.getBoundingClientRect();
|
||||||
|
|
||||||
|
if(PIXI.AUTO_PREVENT_DEFULT)event.preventDefault();
|
||||||
|
|
||||||
var changedTouches = event.changedTouches;
|
var changedTouches = event.changedTouches;
|
||||||
for (var i=0; i < changedTouches.length; i++)
|
for (var i=0; i < changedTouches.length; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,4 +42,5 @@ PIXI.scaleModes = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// interaction frequancy
|
// interaction frequancy
|
||||||
PIXI.INTERACTION_FREQUENCY = 30;
|
PIXI.INTERACTION_FREQUENCY = 30;
|
||||||
|
PIXI.AUTO_PREVENT_DEFULT = true;
|
Loading…
Add table
Add a link
Reference in a new issue