fixed canvasBounds being wrongly calculated due to the resize / setZoom execution order

This commit is contained in:
Hanusiak Piotr 2022-02-01 15:49:23 +01:00
parent 315e2f6417
commit 43b821a4f2

View file

@ -41,8 +41,8 @@ export class WaScaleManager {
this.actualZoom = realSize.width / gameSize.width / devicePixelRatio;
}
this.scaleManager.setZoom(this.actualZoom);
this.scaleManager.resize(gameSize.width, gameSize.height);
this.scaleManager.setZoom(this.actualZoom);
// Override bug in canvas resizing in Phaser. Let's resize the canvas ourselves
const style = this.scaleManager.canvas.style;