ScaleManager#pageAlignVertically

pageAlignVertically : boolean

When enabled the Display canvas will be vertically-aligned in the Parent container (or window).

To align vertically the Parent element should have a non-collapsible height, such that it will maintain
a height larger than the height of the contained Game canvas - the game canvas will then be scaled vertically
within the remaining available height dictated by the Parent element.

One way to prevent the parent from collapsing is to add an absolute "min-height" CSS property to the parent element.
If specifying a relative "min-height/height" or adjusting margins, the Parent height must still be non-collapsible (see note).

Note: In version 2.2 the minimum document height is not automatically set to the viewport/window height.
To automatically update the minimum document height set compatibility.forceMinimumDocumentHeight to true.

Vertical alignment is not applicable with the RESIZE scaling mode.

Default Value
  • false
Source code: core/ScaleManager.js (Line 2276)
doc_phaser
2017-02-14 11:09:12
Comments
Leave a Comment

Please login to continue.