lint fixes

This commit is contained in:
Richard Davey 2018-06-05 01:08:32 +01:00
parent c0ac1259ea
commit a2c20a9aa7
3 changed files with 21 additions and 24 deletions

View file

@ -4,6 +4,8 @@
### Input System New Features + Updates
TODO - Out of Canvas events
* All Input classes are now covered 100% by JSDocs.
* 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.
* `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.

View file

@ -143,11 +143,7 @@ var DataManager = new Class({
{
var list = this.list;
if (typeof key === 'string')
{
return list[key];
}
else
if (Array.isArray(key))
{
var output = [];
@ -158,6 +154,10 @@ var DataManager = new Class({
return output;
}
else
{
return list[key];
}
},
/**
@ -263,11 +263,9 @@ var DataManager = new Class({
}
else
{
var config = key;
for (var key in config)
for (var entry in key)
{
this.setValue(key, config[key]);
this.setValue(entry, key[entry]);
}
}
@ -309,14 +307,13 @@ var DataManager = new Class({
enumerable: true,
get: function () {
get: function ()
{
return list[key];
},
set: function (value) {
set: function (value)
{
if (!_this._frozen)
{
list[key] = value;
@ -324,7 +321,6 @@ var DataManager = new Class({
events.emit('changedata', parent, key, data);
events.emit('changedata_' + key, parent, data);
}
}
});
@ -363,7 +359,7 @@ var DataManager = new Class({
args[1] = key;
args[2] = this.list[key];
callback.apply(scope, args);
callback.apply(context, args);
}
return this;
@ -425,19 +421,17 @@ var DataManager = new Class({
return this;
}
var list = this.list;
if (typeof key === 'string')
{
return this.removeValue(key);
}
else
if (Array.isArray(key))
{
for (var i = 0; i < key.length; i++)
{
this.removeValue(key[i]);
}
}
else
{
return this.removeValue(key);
}
return this;
},

View file

@ -942,7 +942,8 @@ var InputManager = new Class({
if (parent)
{
do {
do
{
if (!parent.visible)
{
visible = false;