jshint fixes for CocoonJS.App and continuing work on the new ScaleManager.

This commit is contained in:
photonstorm 2014-08-31 10:16:53 +01:00
parent 3e1eb10673
commit 4d0cae0e2d
4 changed files with 14 additions and 8 deletions

View file

@ -1,5 +1,6 @@
{
"globals" : { "Phaser": false, "PIXI": false, "p2": false },
"globals" : { "Phaser": false, "PIXI": false, "p2": false, "CocoonJS": false },
// Ignore Environment Globals
"browser" : true, // Standard browser globals e.g. `window`, `document`.

View file

@ -281,7 +281,7 @@ Phaser.ScaleManager.SHOW_ALL = 2;
* @constant
* @type {number}
*/
// Phaser.ScaleManager.FULL_CANVAS = 3;
Phaser.ScaleManager.RESIZE_CANVAS = 3;
Phaser.ScaleManager.prototype = {

View file

@ -304,6 +304,7 @@ Phaser.Stage.prototype.checkVisibility = function () {
CocoonJS.App.onSuspended.addEventListener(function () {
Phaser.Stage.prototype.visibilityChange.call(_this, {type: "pause"});
});
CocoonJS.App.onActivated.addEventListener(function () {
Phaser.Stage.prototype.visibilityChange.call(_this, {type: "resume"});
});

View file

@ -659,7 +659,9 @@ Phaser.Device.prototype = {
{
try {
this.nodeWebkit = (typeof require('nw.gui') !== "undefined");
} catch(error) {
}
catch(error)
{
this.nodeWebkit = false;
}
}
@ -673,7 +675,9 @@ Phaser.Device.prototype = {
{
try {
this.cocoonJSApp = (typeof CocoonJS !== "undefined");
} catch(error) {
}
catch(error)
{
this.cocoonJSApp = false;
}
}