Skip to content

Commit a8b605f

Browse files
committed
Zone now calls updateDisplayOrigin in its constructor, causing the displayOriginX and displayOriginY values to now be correct if you create a Zone and then don't resize it. Fix phaserjs#3865
1 parent 189c2c7 commit a8b605f

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Setting the `resolution` property in the Game Config to a value other than 1 wou
8383
* `ParticleEmitter` would fail to draw a textured particle in Canvas mode (thanks @SBCGames)
8484
* `RenderTexture.preDestroy` will now release the canvas back to the CanvasPool if running in canvas mode (thanks @SBCGames)
8585
* The `alpha` value is now always set for Render Textures in canvas mode, regardless of the previous alpha value in the renderer (thanks @SBCGames)
86+
* Zone now calls `updateDisplayOrigin` in its constructor, causing the `displayOriginX` and `displayOriginY` values to now be correct if you create a Zone and then don't resize it. Fix #3865 (thanks @rexrainbow)
8687

8788
### Examples, Documentation and TypeScript
8889

src/gameobjects/zone/Zone.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ var Zone = new Class({
100100
* @since 3.0.0
101101
*/
102102
this.blendMode = BlendModes.NORMAL;
103+
104+
this.updateDisplayOrigin();
103105
},
104106

105107
/**

0 commit comments

Comments
 (0)