mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Debugging topOnly events
This commit is contained in:
parent
fb2c2c75b2
commit
c7803e0cd2
4 changed files with 15 additions and 0 deletions
|
@ -4,6 +4,8 @@ var ProcessDownEvents = function (pointer)
|
|||
{
|
||||
var currentlyOver = this._temp;
|
||||
|
||||
console.log('ProcessDownEvents', this.topOnly);
|
||||
|
||||
this.events.dispatch(new InputEvent.POINTER_DOWN(pointer, currentlyOver));
|
||||
|
||||
// Go through all objects the pointer was over and fire their events / callbacks
|
||||
|
|
|
@ -11,6 +11,9 @@ var ProcessOverOutEvents = function (pointer)
|
|||
var stillOver = [];
|
||||
var previouslyOver = this._over[pointer.id];
|
||||
|
||||
// TODO - in a topOnly situation a new justOver entry at the top
|
||||
// should clear all previous justOut entries
|
||||
|
||||
// Go through all objects the pointer was previously over, and see if it still is
|
||||
for (i = 0; i < previouslyOver.length; i++)
|
||||
{
|
||||
|
@ -46,6 +49,8 @@ var ProcessOverOutEvents = function (pointer)
|
|||
// Process the Just Out objects
|
||||
var total = justOut.length;
|
||||
|
||||
console.log('justOut', total);
|
||||
|
||||
if (total > 0)
|
||||
{
|
||||
this.sortGameObjects(justOut);
|
||||
|
@ -68,6 +73,7 @@ var ProcessOverOutEvents = function (pointer)
|
|||
|
||||
if (this.topOnly)
|
||||
{
|
||||
console.log('break 1');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -76,6 +82,8 @@ var ProcessOverOutEvents = function (pointer)
|
|||
// Process the Just Over objects
|
||||
total = justOver.length;
|
||||
|
||||
console.log('justOver', total);
|
||||
|
||||
if (total > 0)
|
||||
{
|
||||
this.sortGameObjects(justOver);
|
||||
|
@ -98,6 +106,7 @@ var ProcessOverOutEvents = function (pointer)
|
|||
|
||||
if (this.topOnly)
|
||||
{
|
||||
console.log('break 2');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,6 +130,8 @@ var MouseManager = new Class({
|
|||
return;
|
||||
}
|
||||
|
||||
// console.log('mouse', event);
|
||||
|
||||
queue.push(event);
|
||||
|
||||
event.preventDefault();
|
||||
|
|
|
@ -61,6 +61,8 @@ var TouchManager = new Class({
|
|||
return;
|
||||
}
|
||||
|
||||
// console.log('touch', event);
|
||||
|
||||
queue.push(event);
|
||||
|
||||
event.preventDefault();
|
||||
|
|
Loading…
Reference in a new issue