Skip to content

Commit 883c11e

Browse files
committed
BitmapData.resize fixed to update the crop property too, resolves issues with images getting cut off with BitmapData.load.
1 parent 9c1f39d commit 883c11e

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Version 2.0.7 - "Amadicia" - -in development-
8383
* AnimationManager does not update currentFrame on play until second frame (thanks @Dumtard #1041)
8484
* Animation now guards against _frameData being null (thanks @lucbloom #1033)
8585
* Tilemap.swap now accurately swaps from A to B and from B to A (thanks @noidexe #1034)
86+
* BitmapData.resize fixed to update the crop property too, resolves issues with images getting cut off with BitmapData.load.
8687

8788

8889

src/gameobjects/BitmapData.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,9 @@ Phaser.BitmapData.prototype = {
278278
this.texture.width = width;
279279
this.texture.height = height;
280280

281+
this.texture.crop.width = width;
282+
this.texture.crop.height = height;
283+
281284
this.refreshBuffer();
282285
this.dirty = true;
283286
}

0 commit comments

Comments
 (0)