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