|
|
|
@ -391,7 +391,7 @@ function locolist_show() {
|
|
|
|
|
var win = document.getElementById("locolist");
|
|
|
|
|
|
|
|
|
|
debug ("locolist_show");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!win) {
|
|
|
|
|
debug ("locolist_show create window");
|
|
|
|
|
win = gWindowCreate("locolist", "Locomotives", 400, 500, " \
|
|
|
|
@ -417,8 +417,10 @@ function locolist_show() {
|
|
|
|
|
// append all locomotives
|
|
|
|
|
for (var i = 0; i < locomotives.length; i++) {
|
|
|
|
|
let li = document.createElement("li");
|
|
|
|
|
|
|
|
|
|
li.appendChild(document.createTextNode(locomotives[i].name));
|
|
|
|
|
li.setAttribute("id", "locol_elm_"+locomotives[i].name);
|
|
|
|
|
|
|
|
|
|
ul.appendChild(li);
|
|
|
|
|
|
|
|
|
|
gAddEventListener("locol_elm_"+locomotives[i].name, 'click', locolist_clicked);
|
|
|
|
@ -512,7 +514,7 @@ function lococtrl_speed() {
|
|
|
|
|
|
|
|
|
|
let speed = this.value;
|
|
|
|
|
if (reverse.innerHTML == "REV") speed = -speed;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
debug ("Speed Loco:'"+name+"' Speed:'"+speed+"'");
|
|
|
|
|
for (var i = 0; i < locomotives.length; i++) {
|
|
|
|
|
if (name == locomotives[i].name) {
|
|
|
|
|