Skip to content

Commit 59dddec

Browse files
committed
ScaleManager - orientation
- A few minor quibbles
1 parent e36027f commit 59dddec

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

src/core/ScaleManager.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -449,22 +449,23 @@ Phaser.ScaleManager = function (game, width, height) {
449449

450450
/**
451451
* The last time the bounds were checked in `preUpdate`.
452-
* @property {number} _lastSizeCheck
452+
* @property {number} _lastUpdate
453453
* @private
454454
*/
455-
this._lastSizeCheck = 0;
455+
this._lastUpdate = 0;
456456

457457
/**
458458
* Size checks updates are delayed according to the throttle.
459459
* The throttle increases to `trackParentInterval` over time and is used to more
460460
* rapidly detect changes in certain browsers (eg. IE) while providing back-off safety.
461-
* @property {integer} _sizeCheckThrottle
461+
* @property {integer} _updateThrottle
462462
* @private
463463
*/
464464
this._updateThrottle = 0;
465465

466466
/**
467467
* The minimum throttle allowed until it has slowed down sufficiently.
468+
* @property {integer} _updateThrottleReset
468469
* @private
469470
*/
470471
this._updateThrottleReset = 100;
@@ -896,7 +897,7 @@ Phaser.ScaleManager.prototype = {
896897
*/
897898
preUpdate: function () {
898899

899-
if (this.game.time.time < (this._lastSizeCheck + this._updateThrottle))
900+
if (this.game.time.time < (this._lastUpdate + this._updateThrottle))
900901
{
901902
return;
902903
}
@@ -937,7 +938,7 @@ Phaser.ScaleManager.prototype = {
937938
}
938939

939940
this._updateThrottle = Phaser.Math.clamp(throttle, 25, this.trackParentInterval);
940-
this._lastSizeCheck = this.game.time.time;
941+
this._lastUpdate = this.game.time.time;
941942

942943
},
943944

@@ -1043,11 +1044,11 @@ Phaser.ScaleManager.prototype = {
10431044
* @method Phaser.ScaleManager#classifyOrientation
10441045
* @private
10451046
* @param {string} orientation - The orientation string, e.g. 'portrait-primary'.
1046-
* @return {string|null} The classified orientation: 'portrait', 'landscape`, or null null.
1047+
* @return {string|null} The classified orientation: 'portrait', 'landscape`, or null.
10471048
*/
10481049
classifyOrientation: function (orientation) {
10491050

1050-
if (orientation === 'portrait-primary' || orientation == 'portrait-secondary')
1051+
if (orientation === 'portrait-primary' || orientation === 'portrait-secondary')
10511052
{
10521053
return 'portrait';
10531054
}
@@ -2153,11 +2154,9 @@ Object.defineProperty(Phaser.ScaleManager.prototype, "isLandscape", {
21532154
});
21542155

21552156
/**
2156-
* The _last known_ orientation value of the game, as defined by {@link Phaser.ScaleManager#screenOrientation}.
2157-
* A value of 90 is landscape and 0 is portrait.
2157+
* The _last known_ orientation value of the game. A value of 90 is landscape and 0 is portrait.
21582158
* @property {number} orientation
21592159
* @readonly
2160-
* @public
21612160
* @deprecated 2.1.4 - Use `ScaleManager.screenOrientation` instead.
21622161
*/
21632162
Object.defineProperty(Phaser.ScaleManager.prototype, "orientation", {

0 commit comments

Comments
 (0)