mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 22:52:14 +00:00
jshint fixes for CocoonJS.App and continuing work on the new ScaleManager.
This commit is contained in:
parent
3e1eb10673
commit
4d0cae0e2d
4 changed files with 14 additions and 8 deletions
|
@ -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`.
|
||||
|
||||
|
|
|
@ -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 = {
|
||||
|
||||
|
|
|
@ -299,11 +299,12 @@ Phaser.Stage.prototype.checkVisibility = function () {
|
|||
|
||||
var _this = this;
|
||||
|
||||
if(this.game.device.cocoonJSApp)
|
||||
if (this.game.device.cocoonJSApp)
|
||||
{
|
||||
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"});
|
||||
});
|
||||
|
|
|
@ -650,16 +650,18 @@ Phaser.Device.prototype = {
|
|||
this.cordova = true;
|
||||
}
|
||||
|
||||
if(typeof process !== "undefined" && typeof require !== "undefined")
|
||||
if (typeof process !== "undefined" && typeof require !== "undefined")
|
||||
{
|
||||
this.node = true;
|
||||
}
|
||||
|
||||
if(this.node)
|
||||
if (this.node)
|
||||
{
|
||||
try {
|
||||
this.nodeWebkit = (typeof require('nw.gui') !== "undefined");
|
||||
} catch(error) {
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
this.nodeWebkit = false;
|
||||
}
|
||||
}
|
||||
|
@ -669,11 +671,13 @@ Phaser.Device.prototype = {
|
|||
this.cocoonJS = true;
|
||||
}
|
||||
|
||||
if(this.cocoonJS)
|
||||
if (this.cocoonJS)
|
||||
{
|
||||
try {
|
||||
this.cocoonJSApp = (typeof CocoonJS !== "undefined");
|
||||
} catch(error) {
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
this.cocoonJSApp = false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue