The entire Phaser library has been updated to match the new JSHint configuration.

This commit is contained in:
photonstorm
2013-11-25 04:40:04 +00:00
parent 13a2cc2feb
commit 299115ca5d
74 changed files with 4992 additions and 4977 deletions
+14 -3
View File
@@ -73,7 +73,7 @@ Phaser.StageScaleMode = function (game, width, height) {
* @property {boolean} forcePortrait - If the game should be forced to use Portrait mode, this is set to true by Game.Stage
* @default
*/
this.forcePortrait = false;
this.forcePortrait = false;
/**
* @property {boolean} incorrectOrientation - If the game should be forced to use a specific orientation and the device currently isn't in that orientation this is set to true.
@@ -188,6 +188,11 @@ Phaser.StageScaleMode = function (game, width, height) {
*/
this.aspectRatio = 0;
/**
* @property {any} event- The native browser events from full screen API changes.
*/
this.event = null;
var _this = this;
window.addEventListener('orientationchange', function (event) {
@@ -209,7 +214,7 @@ Phaser.StageScaleMode = function (game, width, height) {
document.addEventListener('fullscreenchange', function (event) {
return _this.fullScreenChange(event);
}, false);
};
/**
@@ -301,6 +306,8 @@ Phaser.StageScaleMode.prototype = {
*/
fullScreenChange: function (event) {
this.event = event;
if (this.isFullScreen)
{
this.game.stage.canvas.style['width'] = '100%';
@@ -429,6 +436,8 @@ Phaser.StageScaleMode.prototype = {
*/
checkOrientation: function (event) {
this.event = event;
this.orientation = window['orientation'];
if (this.isLandscape)
@@ -454,6 +463,8 @@ Phaser.StageScaleMode.prototype = {
*/
checkResize: function (event) {
this.event = event;
if (window.outerWidth > window.outerHeight)
{
this.orientation = 90;
@@ -526,7 +537,7 @@ Phaser.StageScaleMode.prototype = {
force = false;
}
if (this.game.device.iPad === false && this.game.device.webApp === false && this.game.device.desktop === false)
if (this.game.device.iPad === false && this.game.device.webApp === false && this.game.device.desktop === false)
{
if (this.game.device.android && this.game.device.chrome === false)
{