Skip to content

Commit

Permalink
Correct docs in Phaser.Pointer
Browse files Browse the repository at this point in the history
- processButtonsUp uses MouseEvent#button
- processButtonsDown uses MouseEvent#buttons (bitwise)
  • Loading branch information
samme committed Aug 3, 2017
1 parent c3d64b3 commit 0eab902
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/input/Pointer.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ Phaser.Pointer.prototype = {
*
* @method Phaser.Pointer#processButtonsDown
* @private
* @param {integer} buttons - The DOM event.buttons property.
* @param {integer} buttons - {@link https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons MouseEvent#buttons} value.
* @param {MouseEvent} event - The DOM event.
*/
processButtonsDown: function (buttons, event) {
Expand Down Expand Up @@ -485,13 +485,11 @@ Phaser.Pointer.prototype = {
*
* @method Phaser.Pointer#processButtonsUp
* @private
* @param {integer} buttons - The DOM event.buttons property.
* @param {integer} button - {@link https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button MouseEvent#button} value.
* @param {MouseEvent} event - The DOM event.
*/
processButtonsUp: function (button, event) {

// Note: These are bitwise checks, not booleans

if (button === Phaser.Mouse.LEFT_BUTTON)
{
this.leftButton.stop(event);
Expand Down

0 comments on commit 0eab902

Please sign in to comment.