From d50475045dbdf7509fa8858e3702f9f48c8b6b91 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sun, 10 Feb 2019 17:30:01 +0000 Subject: [PATCH] Added `Zone.setBlendMode` method as a NOOP function, fixing a bug where if you added a Zone to a Container when running under Canvas it would fail. Fix #4295 --- CHANGELOG.md | 1 + src/gameobjects/zone/Zone.js | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d0e3b450..9028986f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ The following changes all effect the Matter JS Pointer Constraint class: * `KeyboardPlugin.checkDown` would always fail if using the new event system, because the time value it was checking wasn't updated. * Entering Fullscreen mode in the Scale Manager and then pressing ESC would leave the injected fullsceen div in the DOM, causing it to fail with a node insertion failure the second time you wanted to enter fullscreen mode. Fix #4352 (thanks @ngdevr) * Due to the changes in the Input event system, the `GAME_OUT` event would never fire unless the input system was in legacy mode. The OUT and OVER handlers have been refactored and will now fire as soon as the DOM event happens. As a result the `InputManager._emitIsOverEvent` property has been removed, as the native event is sent directly to the handler and doesn't need storing locally any more. Fix #4344 (thanks @RademCZ) +* Added `Zone.setBlendMode` method as a NOOP function, fixing a bug where if you added a Zone to a Container when running under Canvas it would fail. Fix #4295 (thanks @emanuel15) ### Examples, Documentation and TypeScript diff --git a/src/gameobjects/zone/Zone.js b/src/gameobjects/zone/Zone.js index b47fdd270..dbca76aef 100644 --- a/src/gameobjects/zone/Zone.js +++ b/src/gameobjects/zone/Zone.js @@ -266,6 +266,18 @@ var Zone = new Class({ { }, + /** + * A NOOP method so you can pass a Zone to a Container in Canvas. + * Calling this method will do nothing. It is intentionally empty. + * + * @method Phaser.GameObjects.Zone#setBlendMode + * @private + * @since 3.16.2 + */ + setBlendMode: function () + { + }, + /** * A Zone does not render. *