From 8111d8062ef539af15f2db2a735a8c50543bc2d1 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 23 Jan 2019 22:34:48 +0000 Subject: [PATCH] `Pointer.up` and `Pointer.down` now use a `hasOwnProperty` check for the existance of the buttons property on the event, causing it to be set even if equal to zero, which it is when there are no buttons down --- CHANGELOG.md | 2 ++ src/input/Pointer.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52164a1da..763fd232a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -359,6 +359,8 @@ one set of bindings ever created, which makes things a lot cleaner. * Arcade Physics now manages when `postUpdate` should be applied better, stopping it from gaining a zero delta during a further check in the same frame. This fixes various issues, including the mass collision test demo. Fix #4154 (thanks @samme) * Arcade Physics could trigger a `collide` event on a Body even if it performing an overlap check, if the `onCollide` property was true (thanks @samme) * TileSprites no longer cause a crash when using the Headless mode renderer. Fix #4297 (thanks @clesquir) +* The WebGLRenderer will now apply a transparent background if `transparent = true` in the game config (thanks @gomachan7) +* `Pointer.up` and `Pointer.down` now use a `hasOwnProperty` check for the existance of the buttons property on the event, causing it to be set even if equal to zero, which it is when there are no buttons down (thanks @SonnyCampbell) ### Examples and TypeScript diff --git a/src/input/Pointer.js b/src/input/Pointer.js index 989de1a0a..0431a0f14 100644 --- a/src/input/Pointer.js +++ b/src/input/Pointer.js @@ -567,7 +567,7 @@ var Pointer = new Class({ */ up: function (event, time) { - if (event.buttons) + if (event.hasOwnProperty('buttons')) { this.buttons = event.buttons; } @@ -608,7 +608,7 @@ var Pointer = new Class({ */ down: function (event, time) { - if (event.buttons) + if (event.hasOwnProperty('buttons')) { this.buttons = event.buttons; }