Skip to content
This repository was archived by the owner on Dec 9, 2021. It is now read-only.

Commit 59bca43

Browse files
committed
clean up code with jshint
1 parent c83fc94 commit 59bca43

19 files changed

+65
-65
lines changed

ts/structurets/ObjectManager.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ObjectManager extends BaseObject
5959
* @chainable
6060
* @example
6161
* ClassName.prototype.enable = function() {
62-
* if (this.isEnabled === true) return this;
62+
* if (this.isEnabled === true) { return this; }
6363
*
6464
* this._childInstance.addEventListener(BaseEvent.CHANGE, this.handlerMethod, this);
6565
* this._childInstance.enable();
@@ -69,7 +69,7 @@ class ObjectManager extends BaseObject
6969
*/
7070
public enable():any
7171
{
72-
if (this.isEnabled === true) return this;
72+
if (this.isEnabled === true) { return this; }
7373

7474
this.isEnabled = true;
7575
return this;
@@ -83,7 +83,7 @@ class ObjectManager extends BaseObject
8383
* @chainable
8484
* @example
8585
* ClassName.prototype.disable = function() {
86-
* if (this.isEnabled === false) return this;
86+
* if (this.isEnabled === false) { return this; }
8787
*
8888
* this._childInstance.removeEventListener(BaseEvent.CHANGE, this.handlerMethod, this);
8989
* this._childInstance.disable();
@@ -93,7 +93,7 @@ class ObjectManager extends BaseObject
9393
*/
9494
public disable():any
9595
{
96-
if (this.isEnabled === false) return this;
96+
if (this.isEnabled === false) { return this; }
9797

9898
this.isEnabled = false;
9999
return this;

ts/structurets/controller/ApplicationCacheController.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,22 +117,22 @@ class ApplicationCacheController
117117
{
118118
switch (ApplicationCacheController._appCache.status)
119119
{
120-
case ApplicationCacheController._appCache.UNCACHED: // UNCACHED == 0
120+
case ApplicationCacheController._appCache.UNCACHED: // UNCACHED === 0
121121
return 'UNCACHED';
122122
break;
123-
case ApplicationCacheController._appCache.IDLE: // IDLE == 1
123+
case ApplicationCacheController._appCache.IDLE: // IDLE === 1
124124
return 'IDLE';
125125
break;
126-
case ApplicationCacheController._appCache.CHECKING: // CHECKING == 2
126+
case ApplicationCacheController._appCache.CHECKING: // CHECKING === 2
127127
return 'CHECKING';
128128
break;
129-
case ApplicationCacheController._appCache.DOWNLOADING: // DOWNLOADING == 3
129+
case ApplicationCacheController._appCache.DOWNLOADING: // DOWNLOADING === 3
130130
return 'DOWNLOADING';
131131
break;
132-
case ApplicationCacheController._appCache.UPDATEREADY: // UPDATEREADY == 4
132+
case ApplicationCacheController._appCache.UPDATEREADY: // UPDATEREADY === 4
133133
return 'UPDATEREADY';
134134
break;
135-
case ApplicationCacheController._appCache.OBSOLETE: // OBSOLETE == 5
135+
case ApplicationCacheController._appCache.OBSOLETE: // OBSOLETE === 5
136136
return 'OBSOLETE';
137137
break;
138138
default:

ts/structurets/display/Canvas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Canvas extends CanvasElement
5555
this.width = this.element.width;
5656
this.height = this.element.height;
5757

58-
if (this.isCreated == false)
58+
if (this.isCreated === false)
5959
{
6060
this.createChildren();
6161
this.isCreated = true;

ts/structurets/display/CanvasElement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class CanvasElement extends DisplayObjectContainer
7373

7474
public layoutChildren():any
7575
{
76-
if (this.context == null || this.alpha <= 0 || this.visible == false)
76+
if (this.context == null || this.alpha <= 0 || this.visible === false)
7777
{
7878
return this;
7979
}

ts/structurets/display/DOMElement.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ import ComponentFactory = require("../util/ComponentFactory");
7272
* };
7373
*
7474
* ClassName.prototype.enable = function () {
75-
* if (this.isEnabled === true) return this;
75+
* if (this.isEnabled === true) { return this; }
7676
*
7777
* // Enable the child objects and add any event listeners.
7878
*
7979
* return _super.prototype.enable.call(this);
8080
* };
8181
*
8282
* ClassName.prototype.disable = function () {
83-
* if (this.isEnabled === false) return this;
83+
* if (this.isEnabled === false) { return this; }
8484
*
8585
* // Disable the child objects and remove any event listeners.
8686
*
@@ -126,15 +126,15 @@ import ComponentFactory = require("../util/ComponentFactory");
126126
* };
127127
*
128128
* ClassName.prototype.enable = function () {
129-
* if (this.isEnabled === true) return this;
129+
* if (this.isEnabled === true) { return this; }
130130
*
131131
* // Enable the child objects and add any event listeners.
132132
*
133133
* return _super.prototype.enable.call(this);
134134
* };
135135
*
136136
* ClassName.prototype.disable = function () {
137-
* if (this.isEnabled === false) return this;
137+
* if (this.isEnabled === false) { return this; }
138138
*
139139
* // Disable the child objects and remove any event listeners.
140140
*
@@ -333,7 +333,7 @@ class DOMElement extends DisplayObjectContainer
333333
}
334334

335335
// If an empty jQuery object is passed into the constructor then don't run the code below.
336-
if (child._isReference === true && child.$element.length == 0)
336+
if (child._isReference === true && child.$element.length === 0)
337337
{
338338
return this;
339339
}
@@ -381,7 +381,7 @@ class DOMElement extends DisplayObjectContainer
381381
private onAddedToDom(child:DOMElement)
382382
{
383383
child.checkCount++;
384-
if (child.$element.width() == 0 && child.checkCount < 5)
384+
if (child.$element.width() === 0 && child.checkCount < 5)
385385
{
386386
setTimeout(() =>
387387
{
@@ -404,7 +404,7 @@ class DOMElement extends DisplayObjectContainer
404404
var length = children.length;
405405

406406
// If an empty jQuery object is passed into the constructor then don't run the code below.
407-
if (child._isReference === true && child.$element.length == 0)
407+
if (child._isReference === true && child.$element.length === 0)
408408
{
409409
return this;
410410
}
@@ -474,7 +474,7 @@ class DOMElement extends DisplayObjectContainer
474474
{
475475
// Get the first match from the selector passed in.
476476
var jQueryElement:JQuery = this.$element.find(selector).first();
477-
if (jQueryElement.length == 0)
477+
if (jQueryElement.length === 0)
478478
{
479479
throw new TypeError('[' + this.getQualifiedClassName() + '] getChild(' + selector + ') Cannot find DOM $element');
480480
}

ts/structurets/display/Stage.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ import DOMElement = require("display/DOMElement");
5555
}
5656
5757
MainClass.prototype.enable = function () {
58-
if (this.isEnabled === true) return this;
58+
if (this.isEnabled === true) { return this; }
5959
6060
// Enable the child objects and add any event listeners.
6161
6262
return _super.prototype.enable.call(this);
6363
}
6464
6565
MainClass.prototype.disable = function () {
66-
if (this.isEnabled === false) return this;
66+
if (this.isEnabled === false) { return this; }
6767
6868
// Disable the child objects and remove any event listeners.
6969
@@ -115,7 +115,7 @@ class Stage extends DOMElement
115115
this.$element = jQuery(type);
116116
this.$element.attr('data-cid', this.cid);
117117

118-
if (this.isCreated == false)
118+
if (this.isCreated === false)
119119
{
120120
this.createChildren();
121121
this.isCreated = true;

ts/structurets/event/EventDispatcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class EventDispatcher extends ObjectManager
165165
{
166166
var event = type;
167167

168-
if (typeof event == 'string') {
168+
if (typeof event === 'string') {
169169
event = new BaseEvent(type, false, true, data);
170170
}
171171

ts/structurets/event/LoaderEvent.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class LoaderEvent extends BaseEvent
4848
* @type {string}
4949
* @static
5050
*/
51-
public static COMPLETE:string = "LoaderEvent.complete";
51+
public static COMPLETE:string = 'LoaderEvent.complete';
5252

5353
/**
5454
* The LoaderEvent.LOAD_COMPLETE constant defines the value of the type property of an loader event object.
@@ -57,7 +57,7 @@ class LoaderEvent extends BaseEvent
5757
* @type {string}
5858
* @static
5959
*/
60-
public static LOAD_COMPLETE:string = "LoaderEvent.loadComplete";
60+
public static LOAD_COMPLETE:string = 'LoaderEvent.loadComplete';
6161

6262
/**
6363
* The LoaderEvent.ERROR constant defines the value of the type property of an loader event object.
@@ -66,7 +66,7 @@ class LoaderEvent extends BaseEvent
6666
* @type {string}
6767
* @static
6868
*/
69-
public static ERROR:string = "LoaderEvent.error";
69+
public static ERROR:string = 'LoaderEvent.error';
7070

7171
constructor(type:string, bubbles:boolean = false, cancelable:boolean = false, data:any = null)
7272
{

ts/structurets/model/Collection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Collection extends EventDispatcher implements ICollection
7373
*/
7474
public addItem(item:any, silent:boolean = false):void
7575
{
76-
if (this.hasItem(item) == false)
76+
if (this.hasItem(item) === false)
7777
{
7878
this.items.push(item);
7979
this.length = this.items.length;

ts/structurets/model/Route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* route.match('/product/jackets/');
3838
*
3939
*
40-
* **\*** The asterix character means it will match all or part of part the hash url.
40+
* **\*** The asterisk character means it will match all or part of part the hash url.
4141
*
4242
* var route = new Route('*', this.method, this);
4343
*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy