ambiguous idToObject removed
parent
7b963ce085
commit
f9982a992d
|
@ -513,12 +513,12 @@ GameLib.System.GUI.prototype.buildArrayManagerControl = function(
|
|||
|
||||
array.map(addArrayItem);
|
||||
|
||||
var idToObject = {};
|
||||
var idObject = {};
|
||||
|
||||
var selectionObject = GameLib.EntityManager.Instance.queryComponents(constructors).reduce(
|
||||
function(result, component) {
|
||||
result[component.name] = component;
|
||||
idToObject[component.id] = component;
|
||||
idObject[component.id] = component;
|
||||
return result;
|
||||
},
|
||||
{
|
||||
|
@ -558,7 +558,7 @@ GameLib.System.GUI.prototype.buildArrayManagerControl = function(
|
|||
if (value === 'null') {
|
||||
activeSelection['component'] = null;
|
||||
} else {
|
||||
activeSelection['component'] = idToObject[value];
|
||||
activeSelection['component'] = idObject[value];
|
||||
}
|
||||
}
|
||||
).listen();
|
||||
|
@ -624,12 +624,12 @@ GameLib.System.GUI.prototype.buildSelectControl = function(folder, componentTemp
|
|||
|
||||
var objects = GameLib.EntityManager.Instance.queryComponents(constructor);
|
||||
|
||||
var idToObject = {};
|
||||
var idObject = {};
|
||||
|
||||
var options = objects.reduce(
|
||||
function(result, obj) {
|
||||
result[obj.name] = obj;
|
||||
idToObject[obj.id] = obj;
|
||||
idObject[obj.id] = obj;
|
||||
return result;
|
||||
},
|
||||
{
|
||||
|
@ -648,7 +648,7 @@ GameLib.System.GUI.prototype.buildSelectControl = function(folder, componentTemp
|
|||
var newComponent = null;
|
||||
|
||||
if (value !== 'null') {
|
||||
newComponent = idToObject[value];
|
||||
newComponent = idObject[value];
|
||||
}
|
||||
|
||||
componentTemplate.affected.map(
|
||||
|
|
Loading…
Reference in New Issue