Report full sprite info in targetsUpdate

We need more than just the name for the initial render, so send everything consistent with sprite info reports.
This commit is contained in:
Ray Schamp 2016-12-05 18:02:51 -05:00
parent adaf2df743
commit e9da046969
4 changed files with 32 additions and 13 deletions
playground

View file

@ -121,13 +121,13 @@ window.onload = function() {
// Generate new select box.
for (var i = 0; i < data.targetList.length; i++) {
var targetOption = document.createElement('option');
targetOption.setAttribute('value', data.targetList[i][0]);
targetOption.setAttribute('value', data.targetList[i].id);
// If target id matches editingTarget id, select it.
if (data.targetList[i][0] == data.editingTarget) {
if (data.targetList[i].id == data.editingTarget) {
targetOption.setAttribute('selected', 'selected');
}
targetOption.appendChild(
document.createTextNode(data.targetList[i][1])
document.createTextNode(data.targetList[i].name)
);
selectedTarget.appendChild(targetOption);
}