Jump to content

Phaser.ScaleManager.SHOW_ALL broken?


Smrdis
 Share

Recommended Posts

This can apparently happen when the game canvas is inside another element, div for example. To avoid it you can set the canvas to the body giving the element name '':

var game = new Phaser.Game(800, 600, Phaser.AUTO, '');

Saddly, this is not enough to solve my problems as I need to have the canvas inside other elements on the page.

Link to comment
Share on other sites

  • 3 weeks later...

Hi guys,

 

I have had the same problem as you with this issue, since upgrading to 2.2.2. After alot of headbanging (as I needed to keep the parent container too) I've finally found the change needed to make it work.

 

On your boot state, add the following line so the game knows to use the bottom of your screen as a contraint:-

game.scale.windowConstraints.bottom = "visual";

Hope this helps!

 

Cameron

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...