Skip to content

Commit 19c5340

Browse files
committed
CanvasTexture.setSize forgot to update the width and height properties of the Texture itself. These now match the underlying canvas element. Fix phaserjs#5054
1 parent 7525ed2 commit 19c5340

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/textures/CanvasTexture.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,10 @@ var CanvasTexture = new Class({
595595
// Update the Frame
596596
this.frames['__BASE'].setSize(width, height, 0, 0);
597597

598+
// Update this
599+
this.width = width;
600+
this.height = height;
601+
598602
this.refresh();
599603
}
600604

0 commit comments

Comments
 (0)