@@ -872,11 +872,11 @@ Phaser.ScaleManager.prototype = {
872872
873873 /**
874874 * Invoked when the game is resumed.
875- * @method Phaser.ScaleManager#gameResumed
875+ *
876+ * @method Phaser.ScaleManager#_gameResumed
876877 * @private
877878 */
878- _gameResumed : function ( )
879- {
879+ _gameResumed : function ( ) {
880880
881881 this . queueUpdate ( true ) ;
882882
@@ -1079,6 +1079,12 @@ Phaser.ScaleManager.prototype = {
10791079
10801080 } ,
10811081
1082+ /**
1083+ * Update method while paused.
1084+ *
1085+ * @method Phaser.ScaleManager#pauseUpdate
1086+ * @private
1087+ */
10821088 pauseUpdate : function ( ) {
10831089
10841090 this . preUpdate ( ) ;
@@ -1125,6 +1131,8 @@ Phaser.ScaleManager.prototype = {
11251131 /**
11261132 * Update relevant scaling values based on the ScaleManager dimension and game dimensions,
11271133 * which should already be set. This does not change `sourceAspectRatio`.
1134+ *
1135+ * @method Phaser.ScaleManager#updateScalingAndBounds
11281136 * @private
11291137 */
11301138 updateScalingAndBounds : function ( ) {
@@ -1175,6 +1183,7 @@ Phaser.ScaleManager.prototype = {
11751183
11761184 /**
11771185 * Classify the orientation, per `getScreenOrientation`.
1186+ *
11781187 * @method Phaser.ScaleManager#classifyOrientation
11791188 * @private
11801189 * @param {string } orientation - The orientation string, e.g. 'portrait-primary'.
@@ -1229,7 +1238,8 @@ Phaser.ScaleManager.prototype = {
12291238 }
12301239 }
12311240
1232- if ( correctnessChanged ) {
1241+ if ( correctnessChanged )
1242+ {
12331243 if ( this . incorrectOrientation )
12341244 {
12351245 this . enterIncorrectOrientation . dispatch ( ) ;
@@ -1281,11 +1291,14 @@ Phaser.ScaleManager.prototype = {
12811291
12821292 /**
12831293 * Scroll to the top - in some environments. See `compatibility.scrollTo`.
1294+ *
1295+ * @method Phaser.ScaleManager#scrollTop
12841296 * @private
12851297 */
12861298 scrollTop : function ( ) {
12871299
12881300 var scrollTo = this . compatibility . scrollTo ;
1301+
12891302 if ( scrollTo )
12901303 {
12911304 window . scrollTo ( scrollTo . x , scrollTo . y ) ;
@@ -1434,11 +1447,13 @@ Phaser.ScaleManager.prototype = {
14341447 bounds . setTo ( clientRect . left , clientRect . top , clientRect . width , clientRect . height ) ;
14351448
14361449 var wc = this . windowConstraints ;
1450+
14371451 if ( wc . right )
14381452 {
14391453 var windowBounds = wc . right === 'layout' ? layoutBounds : visualBounds ;
14401454 bounds . right = Math . min ( bounds . right , windowBounds . width ) ;
14411455 }
1456+
14421457 if ( wc . bottom )
14431458 {
14441459 var windowBounds = wc . bottom === 'layout' ? layoutBounds : visualBounds ;
@@ -1489,6 +1504,7 @@ Phaser.ScaleManager.prototype = {
14891504 }
14901505
14911506 canvas . style . marginLeft = margin . left + 'px' ;
1507+
14921508 if ( margin . left !== 0 )
14931509 {
14941510 margin . right = - ( parentBounds . width - canvasBounds . width - margin . left ) ;
@@ -1514,6 +1530,7 @@ Phaser.ScaleManager.prototype = {
15141530 }
15151531
15161532 canvas . style . marginTop = margin . top + 'px' ;
1533+
15171534 if ( margin . top !== 0 )
15181535 {
15191536 margin . bottom = - ( parentBounds . height - canvasBounds . height - margin . top ) ;
@@ -1535,8 +1552,7 @@ Phaser.ScaleManager.prototype = {
15351552 * @method Phaser.ScaleManager#reflowGame
15361553 * @private
15371554 */
1538- reflowGame : function ( )
1539- {
1555+ reflowGame : function ( ) {
15401556
15411557 this . resetCanvas ( '' , '' ) ;
15421558
@@ -1593,13 +1609,15 @@ Phaser.ScaleManager.prototype = {
15931609 if ( typeof cssHeight === 'undefined' ) { cssHeight = this . height + 'px' ; }
15941610
15951611 var canvas = this . game . canvas ;
1612+
15961613 if ( ! this . compatibility . noMargins )
15971614 {
15981615 canvas . style . marginLeft = '' ;
15991616 canvas . style . marginTop = '' ;
16001617 canvas . style . marginRight = '' ;
16011618 canvas . style . marginBottom = '' ;
16021619 }
1620+
16031621 canvas . style . width = cssWidth ;
16041622 canvas . style . height = cssHeight ;
16051623
@@ -1613,13 +1631,15 @@ Phaser.ScaleManager.prototype = {
16131631 * @param {boolean } force - If true resets the parent bounds to ensure the check is dirty.
16141632 */
16151633 queueUpdate : function ( force ) {
1634+
16161635 if ( force )
16171636 {
16181637 this . _parentBounds . width = 0 ;
16191638 this . _parentBounds . height = 0 ;
16201639 }
16211640
16221641 this . _updateThrottle = this . _updateThrottleReset ;
1642+
16231643 } ,
16241644
16251645 /**
@@ -1664,6 +1684,7 @@ Phaser.ScaleManager.prototype = {
16641684 var height = bounds . height ;
16651685
16661686 var multiplier ;
1687+
16671688 if ( expanding )
16681689 {
16691690 multiplier = Math . max ( ( height / this . game . height ) , ( width / this . game . width ) ) ;
@@ -1720,11 +1741,15 @@ Phaser.ScaleManager.prototype = {
17201741 * @protected
17211742 */
17221743 createFullScreenTarget : function ( ) {
1744+
17231745 var fsTarget = document . createElement ( 'div' ) ;
1746+
17241747 fsTarget . style . margin = '0' ;
17251748 fsTarget . style . padding = '0' ;
17261749 fsTarget . style . background = '#000' ;
1750+
17271751 return fsTarget ;
1752+
17281753 } ,
17291754
17301755 /**
@@ -1761,11 +1786,10 @@ Phaser.ScaleManager.prototype = {
17611786
17621787 // IE11 clicks trigger MSPointer which is not the mousePointer
17631788 var input = this . game . input ;
1764- if ( input . activePointer !== input . mousePointer &&
1765- ( allowTrampoline || allowTrampoline !== false ) )
1789+
1790+ if ( input . activePointer !== input . mousePointer && ( allowTrampoline || allowTrampoline !== false ) )
17661791 {
1767- input . activePointer . addClickTrampoline (
1768- "startFullScreen" , this . startFullScreen , this , [ antialias , false ] ) ;
1792+ input . activePointer . addClickTrampoline ( "startFullScreen" , this . startFullScreen , this , [ antialias , false ] ) ;
17691793 return ;
17701794 }
17711795
@@ -1787,6 +1811,7 @@ Phaser.ScaleManager.prototype = {
17871811 var initData = {
17881812 targetElement : fsTarget
17891813 } ;
1814+
17901815 this . onFullScreenInit . dispatch ( this , initData ) ;
17911816
17921817 if ( this . _createdFullScreenTarget )
@@ -1836,11 +1861,13 @@ Phaser.ScaleManager.prototype = {
18361861 * Cleans up the previous fullscreen target, if such was automatically created.
18371862 * This ensures the canvas is restored to its former parent, assuming the target didn't move.
18381863 *
1864+ * @method Phaser.ScaleManager#cleanupCreatedTarget
18391865 * @private
18401866 */
18411867 cleanupCreatedTarget : function ( ) {
18421868
18431869 var fsTarget = this . _createdFullScreenTarget ;
1870+
18441871 if ( fsTarget && fsTarget . parentNode )
18451872 {
18461873 // Make sure to cleanup synthetic target for sure;
@@ -2128,6 +2155,7 @@ Phaser.ScaleManager.prototype.checkOrientationState = function () {
21282155* This `null` if `parentIsWindow` is true or if fullscreen mode is entered and `fullScreenTarget` is specified.
21292156* It will also be null if there is no game canvas or if the game canvas has no parent.
21302157*
2158+ * @name Phaser.ScaleManager#boundingParent
21312159* @property {?DOMElement } boundingParent
21322160* @readonly
21332161*/
0 commit comments