Skip to content

Commit

Permalink
Fix issue pixijs#2662
Browse files Browse the repository at this point in the history
  • Loading branch information
starakaj committed Oct 25, 2016
1 parent 4acafd7 commit 8b0b76b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/interaction/InteractionManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,9 @@ export default class InteractionManager extends EventEmitter
if (hit)
{
displayObject._touchDown = true;
if(typeof displayObject._touchCount === "undefined")
displayObject._touchCount = 0;
displayObject._touchCount ++;
this.dispatchEvent(displayObject, 'touchstart', this.eventData);
}
}
Expand Down Expand Up @@ -1381,15 +1384,15 @@ export default class InteractionManager extends EventEmitter
{
this.dispatchEvent(displayObject, 'touchend', this.eventData);

if (displayObject._touchDown)
if (displayObject._touchCount > 0)
{
displayObject._touchDown = false;
displayObject._touchCount --;
this.dispatchEvent(displayObject, 'tap', this.eventData);
}
}
else if (displayObject._touchDown)
else if (displayObject._touchCount)
{
displayObject._touchDown = false;
displayObject._touchCount --;
this.dispatchEvent(displayObject, 'touchendoutside', this.eventData);
}
}
Expand Down

0 comments on commit 8b0b76b

Please sign in to comment.