Skip to content

Commit 9911802

Browse files
committed
Removed resize handling.
* The `Game.resize` method has been removed as it's no longer required. You should now call `ScaleManager.resize` instead. * The Game will no longer dispatch the `resize` event. You should now listen for this event from the Scale Manager instead.
1 parent a9ddf46 commit 9911802

1 file changed

Lines changed: 0 additions & 57 deletions

File tree

src/boot/Game.js

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -688,63 +688,6 @@ var Game = new Class({
688688
this.loop.focus();
689689
},
690690

691-
/**
692-
* Game Resize event.
693-
*
694-
* Listen for it using the event type `resize`.
695-
*
696-
* @event Phaser.Game#resizeEvent
697-
* @param {number} width - The new width of the Game.
698-
* @param {number} height - The new height of the Game.
699-
*/
700-
701-
/**
702-
* Updates the Game Config with the new width and height values given.
703-
* Then resizes the Renderer and Input Manager scale.
704-
*
705-
* @method Phaser.Game#resize
706-
* @fires Phaser.Game#resizeEvent
707-
* @since 3.2.0
708-
*
709-
* @param {number} width - The new width of the game.
710-
* @param {number} height - The new height of the game.
711-
*/
712-
resize: function ()
713-
{
714-
var width = this.scaleManager.baseSize.width;
715-
var height = this.scaleManager.baseSize.height;
716-
717-
this.renderer.resize();
718-
719-
// this.input.resize();
720-
721-
this.scene.resize(width, height);
722-
723-
this.events.emit('resize', width, height);
724-
725-
/*
726-
this.config.width = width;
727-
this.config.height = height;
728-
729-
if (typeof EXPERIMENTAL)
730-
{
731-
if (this.domContainer)
732-
{
733-
this.domContainer.style.width = width + 'px';
734-
this.domContainer.style.height = height + 'px';
735-
}
736-
}
737-
738-
this.renderer.resize(width, height);
739-
740-
this.input.resize();
741-
742-
this.scene.resize(width, height);
743-
744-
this.events.emit('resize', width, height);
745-
*/
746-
},
747-
748691
/**
749692
* Returns the current game frame.
750693
* When the game starts running, the frame is incremented every time Request Animation Frame, or Set Timeout, fires.

0 commit comments

Comments
 (0)