From 187387126d5c179bdd476e4ee3715f74e50d0998 Mon Sep 17 00:00:00 2001 From: Lewis Lane Date: Sun, 22 Jun 2014 23:03:15 +0100 Subject: [PATCH] Fix checkPointerDown method checkPointerDown method was a verbatim duplication of checkPointerOver - added pointer.isDown check to passed pointer and altered wording of associated docs to make it clearer what the method is doing. --- src/input/InputHandler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input/InputHandler.js b/src/input/InputHandler.js index 6881b5d84..ef6570e56 100644 --- a/src/input/InputHandler.js +++ b/src/input/InputHandler.js @@ -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; }