Skip to content

Commit

Permalink
Corrected an error in Container.getBoundsTransformMatrix that called …
Browse files Browse the repository at this point in the history
…a missing method, causing a `getBounds` on a nested container to fail. Fix #3624
  • Loading branch information
photonstorm committed May 15, 2018
1 parent 5b0cb0f commit 26faa58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -48,6 +48,7 @@ The new Plugin Manager and associated classes are 100% covered by JSDocs and the
* Utils.Array.BringToTop failed to move the penultimate item in an array due to an index error. Fix #3658 (thanks @agar3s)
* The Headless renderer was broken due to an invalid access during TextureSource.init.
* Animation.yoyo was ignored when calculating the next frame to advance to, breaking the yoyo effect. It now yoyos properly (thanks Tomas)
* Corrected an error in Container.getBoundsTransformMatrix that called a missing method, causing a `getBounds` on a nested container to fail. Fix #3624 (thanks @poasher)

### Examples, Documentation and TypeScript

Expand Down
14 changes: 2 additions & 12 deletions src/gameobjects/container/Container.js
Expand Up @@ -416,7 +416,7 @@ var Container = new Class({

/**
* Returns the world transform matrix as used for Bounds checks.
* The returned matrix is a temporal and shouldn't be stored.
* The returned matrix is temporal and shouldn't be stored.
*
* @method Phaser.GameObjects.Container#getBoundsTransformMatrix
* @since 3.4.0
Expand All @@ -425,17 +425,7 @@ var Container = new Class({
*/
getBoundsTransformMatrix: function ()
{
var tempMatrix = this.tempTransformMatrix;

tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);

if (this.parentContainer)
{
var parentMatrix = this.parentContainer.getTransformMatrix();
tempMatrix.multiply(parentMatrix);
}

return tempMatrix;
return this.getWorldTransformMatrix(this.tempTransformMatrix);
},

/**
Expand Down

0 comments on commit 26faa58

Please sign in to comment.