Skip to content

Commit a2c20a9

Browse files
committed
lint fixes
1 parent c0ac125 commit a2c20a9

3 files changed

Lines changed: 21 additions & 24 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
### Input System New Features + Updates
66

7+
TODO - Out of Canvas events
8+
79
* All Input classes are now covered 100% by JSDocs.
810
* The Input Manager and Input Plugin have been updated to support multiple simultaneous Pointers. Before, only one active pointer (mouse or touch) was supported. Now, you can have as many active pointers as you need, allowing for complex multi-touch games. These are stored in the Input Manager `pointers` array.
911
* `addPointer` allows you to add one, or more, new pointers to the Input Manager. There is no hard-coded limit to the amount you can have, although realistically you should never need more than 10. This method is available on both the Input Manager and Plugin, allowing you to use `this.input.addPointer` from within your game code.

src/data/DataManager.js

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,7 @@ var DataManager = new Class({
143143
{
144144
var list = this.list;
145145

146-
if (typeof key === 'string')
147-
{
148-
return list[key];
149-
}
150-
else
146+
if (Array.isArray(key))
151147
{
152148
var output = [];
153149

@@ -158,6 +154,10 @@ var DataManager = new Class({
158154

159155
return output;
160156
}
157+
else
158+
{
159+
return list[key];
160+
}
161161
},
162162

163163
/**
@@ -263,11 +263,9 @@ var DataManager = new Class({
263263
}
264264
else
265265
{
266-
var config = key;
267-
268-
for (var key in config)
266+
for (var entry in key)
269267
{
270-
this.setValue(key, config[key]);
268+
this.setValue(entry, key[entry]);
271269
}
272270
}
273271

@@ -309,22 +307,20 @@ var DataManager = new Class({
309307

310308
enumerable: true,
311309

312-
get: function () {
313-
310+
get: function ()
311+
{
314312
return list[key];
315-
316313
},
317314

318-
set: function (value) {
319-
315+
set: function (value)
316+
{
320317
if (!_this._frozen)
321318
{
322319
list[key] = value;
323320

324321
events.emit('changedata', parent, key, data);
325322
events.emit('changedata_' + key, parent, data);
326323
}
327-
328324
}
329325

330326
});
@@ -363,7 +359,7 @@ var DataManager = new Class({
363359
args[1] = key;
364360
args[2] = this.list[key];
365361

366-
callback.apply(scope, args);
362+
callback.apply(context, args);
367363
}
368364

369365
return this;
@@ -425,19 +421,17 @@ var DataManager = new Class({
425421
return this;
426422
}
427423

428-
var list = this.list;
429-
430-
if (typeof key === 'string')
431-
{
432-
return this.removeValue(key);
433-
}
434-
else
424+
if (Array.isArray(key))
435425
{
436426
for (var i = 0; i < key.length; i++)
437427
{
438428
this.removeValue(key[i]);
439429
}
440430
}
431+
else
432+
{
433+
return this.removeValue(key);
434+
}
441435

442436
return this;
443437
},

src/input/InputManager.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,8 @@ var InputManager = new Class({
942942

943943
if (parent)
944944
{
945-
do {
945+
do
946+
{
946947
if (!parent.visible)
947948
{
948949
visible = false;

0 commit comments

Comments
 (0)