Merge pull request #936 from lewster32/patch-2

Fix checkPointerDown method
This commit is contained in:
Richard Davey 2014-06-23 23:45:08 +01:00
commit e74cedf73e

View file

@ -610,14 +610,14 @@ Phaser.InputHandler.prototype = {
},
/**
* Checks if the given pointer is over this Sprite and can click it.
* Checks if the given pointer is both down and over this Sprite.
* @method Phaser.InputHandler#checkPointerDown
* @param {Phaser.Pointer} pointer
* @return {boolean} True if the pointer is down, otherwise false.
*/
checkPointerDown: function (pointer) {
if (!this.enabled || !this.sprite || !this.sprite.parent || !this.sprite.visible || !this.sprite.parent.visible)
if (!pointer.isDown || !this.enabled || !this.sprite || !this.sprite.parent || !this.sprite.visible || !this.sprite.parent.visible)
{
return false;
}