mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 14:40:38 +00:00
ScaleManager.refresh
is now called when the Game.READY
event fires. This fixes a bug where the Scale Manager would have the incorrect canvas bounds, because they were calculated before a previous canvas was removed from the DOM. Fix #4905
This commit is contained in:
parent
e8a8dd53e7
commit
ce236f0d69
1 changed files with 2 additions and 1 deletions
|
@ -421,7 +421,7 @@ var ScaleManager = new Class({
|
|||
// Parse the config to get the scaling values we need
|
||||
this.parseConfig(this.game.config);
|
||||
|
||||
this.game.events.once('boot', this.boot, this);
|
||||
this.game.events.once(GameEvents.BOOT, this.boot, this);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -464,6 +464,7 @@ var ScaleManager = new Class({
|
|||
}
|
||||
|
||||
game.events.on(GameEvents.PRE_STEP, this.step, this);
|
||||
game.events.once(GameEvents.READY, this.refresh, this);
|
||||
game.events.once(GameEvents.DESTROY, this.destroy, this);
|
||||
|
||||
this.startListeners();
|
||||
|
|
Loading…
Reference in a new issue