mirror of
https://github.com/photonstorm/phaser
synced 2025-02-26 04:17:08 +00:00
ScaleManager.windowContraints now allows specifing 'visual' or 'layout' as the constraint. Using the 'layout' constraint should prevent a mobile device from trying to resize the game when zooming. Including the the new changes the defaults have been changed to windowContraints = { right: 'layout', bottom: '' } This changes the current scaling behavior as seen in "Game Scaling" (as it will only scale for the right edge) but also prevents such scaling from going wonkers in some mobile environtments like the newer Android browser. (Automatic scroll-to-top, albeit configurable, enabled for non-desktop by default is not a fun situation here.) To obtain the current semantics on a desktop the bottom should be changed to 'layout'; although this will result in different behavior depending on mobile device. To make the sizing also follow mobile zooming they should be changed to 'visual'. Also added temp Rectangle re-used for various internal calculations. --- Phaser.DOM now also special-cases desktops to align the layout bounds correctly (this may disagree with CSS breakpoints but it aligns the with actual CSS width), without applying a window height/width expansion as required on mobile browsers. (And the jshint error isn't mine..) |
||
---|---|---|
.. | ||
Canvas.js | ||
Device.js | ||
DOM.js | ||
RequestAnimationFrame.js |