litte detail display on track information is working.

master
Steffen Pohle 2 years ago
parent db27a5a02a
commit 0c73a38dc8

@ -1,3 +1,7 @@
2023-04-02:
- fixed: track infomation is fixed.
- removed unneded debug file
2023-03-13:
- prepared split and short tracks. - needs to be tested completly.

@ -36,7 +36,7 @@ function block_Update(blockdata) {
}
// not found add element
//debug ("Add Interface:" + intdata.name + "(" + intdata.host + ")");
//console.log ("Add Interface:" + intdata.name + "(" + intdata.host + ")");
blocks.push ({
name: blockdata.name,
flags: blockdata.flags,
@ -189,7 +189,7 @@ function block_server_Clear(blockname) {
//
function block_server_Off(blockname) {
var request = { command: "blockoff", block: blockname };
debug ("send BlockOff:" + blockname);
console.log ("send BlockOff:" + blockname);
serverinout (request, serverinout_defaultCallback);
};
@ -263,10 +263,10 @@ function blockdetail_show(name, create) {
</div> \
\
";
debug ("blockdetail_show");
console.log ("blockdetail_show");
if (!win) {
debug ("blockdetail_show create window");
console.log ("blockdetail_show create window");
win = gWindowCreate("blockdetail", "Block", 500, 400, innerHTML);
gAddEventListener("blockdet_CLOSE", 'click', blockdetail_cb_close);
@ -340,7 +340,7 @@ function blockdetail_cb_next () {
if (i == cursel) blockdetail_setData(blocks[i]);
}
// debug ("Cursel: " + cursel + " interfaces.lenght:" + interfaces.length);
// console.log ("Cursel: " + cursel + " interfaces.lenght:" + interfaces.length);
};
@ -363,7 +363,7 @@ function blockdetail_cb_prev () {
if (i == cursel) blockdetail_setData(blocks[i]);
}
// debug ("Cursel: " + cursel + " interfaces.lenght:" + interfaces.length);
// console.log ("Cursel: " + cursel + " interfaces.lenght:" + interfaces.length);
};

@ -6,7 +6,7 @@ var MousePosY = null;
//
// init all variables with the class givin
$(document).ready(function() {
// debug ("init");
// console.log ("init");
$(".GUIwindow").each( function (i) {
gWindowDragElement(this);
@ -65,7 +65,7 @@ function gContextmenuCreate(title, clientInnerHTML) {
parent.removeChild(cm);
}
debug("create Contextmenu:" + title);
console.log("create Contextmenu:" + title);
var head = document.createElement("div");
head.setAttribute("id", "ConextMenuHead");

@ -1,5 +0,0 @@
function debug (t) {
console.log (t);
};

@ -77,7 +77,7 @@ function gWindowDragElement(elmnt) {
function gWindowCreate(id, title, sizex, sizey, clientHTML) {
var win = document.getElementById(id);
if (!win) {
debug("create Title:" + title);
console.log("create Title:" + title);
var head = document.createElement("div");
head.setAttribute("id", id+"Head");
@ -98,7 +98,7 @@ function gWindowCreate(id, title, sizex, sizey, clientHTML) {
document.body.appendChild(win);
gWindowDragElement(win);
debug ("move to 100px from top");
console.log ("move to 100px from top");
win.style.top = "100px";
}
return win;
@ -108,7 +108,7 @@ function gWindowCreate(id, title, sizex, sizey, clientHTML) {
function gWindowCreateSize(id, title, sizex, sizey) {
var win = document.getElementById(id);
if (!win) {
debug("create Title:" + title);
console.log("create Title:" + title);
var head = document.createElement("div");
head.setAttribute("id", id+"Head");
@ -129,7 +129,7 @@ function gWindowCreateSize(id, title, sizex, sizey) {
win.appendChild (client);
document.body.appendChild(win);
gWindowDragElement(win);
debug ("move to 100px from top");
console.log ("move to 100px from top");
win.style.top = "100px";
}
return win;

@ -3,7 +3,6 @@
<head>
<title>Modelbahn</title>
<script src="jquery-3.1.0.min.js"></script>
<script src="gui/guidebug.js"></script>
<script src="gui/guiwindow.js"></script>
<script src="gui/gui.js"></script>
<script src="serverinout.js"></script>

@ -10,7 +10,7 @@ var interfaces = [];
function interface_Update(intdata) {
for (var i = 0; i < interfaces.length; i++) {
if (intdata.name == interfaces[i].name) {
debug ("Update Interface:" + interfaces[i].name + "(" + interfaces[i].host + ") with Interface:" + intdata.name + "(" + intdata.host + ") Flags:" + intdata.flags);
console.log ("Update Interface:" + interfaces[i].name + "(" + interfaces[i].host + ") with Interface:" + intdata.name + "(" + intdata.host + ") Flags:" + intdata.flags);
if (!(intdata.flags & 0x0001)) sideBtnOnOffMode (3); // not connected
else if ((intdata.flags & 0x0010)) sideBtnOnOffMode (3); // programming mode
@ -28,7 +28,7 @@ function interface_Update(intdata) {
}
// not found add element
//debug ("Add Interface:" + intdata.name + "(" + intdata.host + ")");
//console.log ("Add Interface:" + intdata.name + "(" + intdata.host + ")");
interfaces.push ({
name: intdata.name,
host: intdata.host,
@ -80,10 +80,10 @@ function interface_server_Del(elm) {
function intdetail_show(intname) {
var win = document.getElementById("intdetail");
debug ("intdetail_show");
console.log ("intdetail_show");
if (!win) {
debug ("intdetail_show create window");
console.log ("intdetail_show create window");
win = gWindowCreate("intdetail", "Interface", 400, 300, " \
<div style=\"float: left\"> \
Interface Name: <input id=\"intdet_name\" style=\"width: 100\"> \
@ -181,7 +181,7 @@ function intdetail_cb_next () {
if (i == cursel) intdetail_setData(interfaces[i]);
}
// debug ("Cursel: " + cursel + " interfaces.lenght:" + interfaces.length);
// console.log ("Cursel: " + cursel + " interfaces.lenght:" + interfaces.length);
};
@ -204,7 +204,7 @@ function intdetail_cb_prev () {
if (i == cursel) intdetail_setData(interfaces[i]);
}
// debug ("Cursel: " + cursel + " interfaces.lenght:" + interfaces.length);
// console.log ("Cursel: " + cursel + " interfaces.lenght:" + interfaces.length);
};

@ -21,7 +21,7 @@ function locomotive_Update(data) {
if (data.name == locomotives[i].name) {
var loco_name = document.getElementById("locodet_name");
debug ("Update Locomotive:" + locomotives[i].name + " with Locomotive:" + data.name);
console.log ("Update Locomotive:" + locomotives[i].name + " with Locomotive:" + data.name);
locomotives[i].name = data.name;
locomotives[i].ifname = data.ifname;
locomotives[i].addr = data.addr;
@ -52,7 +52,7 @@ function locomotive_Update(data) {
}
// not found add element
debug ("Add Locomotive:" + data.name);
console.log ("Add Locomotive:" + data.name);
locomotives.push ({
name: data.name,
ifname: data.ifname,
@ -146,10 +146,10 @@ function locomotive_server_Set(elm) {
function locodetail_show(loconame) {
var win = document.getElementById("locodetail");
debug ("locodetail_show");
console.log ("locodetail_show");
if (!win) {
debug ("loco_showdetail create window");
console.log ("loco_showdetail create window");
win = gWindowCreate("locodetail", "Locomotive", 450, 500,
"<div style=\"float: left\"> \
Name: <input id=\"locodet_name\" style=\"width: 100\"> \
@ -361,7 +361,7 @@ function locodetail_cb_btnmove () {
}
locomotive_server_Set ({name: loco_name.value, speed: speed});
debug ("Locomotive: '" + loco_name.value +"' Speed: " + speed);
console.log ("Locomotive: '" + loco_name.value +"' Speed: " + speed);
};
@ -415,7 +415,7 @@ function locodetail_cb_next () {
if (i == cursel) locodetail_setData(locomotives[i]);
}
debug ("Cursel: " + cursel + " locomotives.lenght:" + locomotives.length);
console.log ("Cursel: " + cursel + " locomotives.lenght:" + locomotives.length);
};
@ -438,7 +438,7 @@ function locodetail_cb_prev () {
if (i == cursel) locodetail_setData(locomotives[i]);
}
debug ("Cursel: " + cursel + " locomotives.lenght:" + locomotives.length);
console.log ("Cursel: " + cursel + " locomotives.lenght:" + locomotives.length);
};
@ -516,7 +516,7 @@ function locodetail_setData(elm) {
var codes = document.getElementsByName('STEPCODE');
for(var i = 0; i < codes.length; i++) {
// debug ("STEPCODE: elm.stepcode: " + elm.stepcode + " i:" + i + " codes[i].value: " + codes[i].value + " codes.id: " + codes[i].id);
// console.log ("STEPCODE: elm.stepcode: " + elm.stepcode + " i:" + i + " codes[i].value: " + codes[i].value + " codes.id: " + codes[i].id);
if(elm.stepcode == codes[i].value) codes[i].checked = true;
else codes[i].checked = false;
}
@ -575,10 +575,10 @@ function locodetail_getData() {
function locolist_show() {
var win = document.getElementById("locolist");
debug ("locolist_show");
console.log ("locolist_show");
if (!win) {
debug ("locolist_show create window");
console.log ("locolist_show create window");
win = gWindowCreate("locolist", "Locomotives", 400, 500, " \
<div id=\"locolist_listdiv\"> \
<ul id=\"locolist_elements\" style=\"list-style-type:none\"></ul> \
@ -617,7 +617,7 @@ function locolist_show() {
function locolist_clicked() {
var i;
debug ("childnodes: " + this.childNodes[0].textContent);
console.log ("childnodes: " + this.childNodes[0].textContent);
lococtrl_show(this.childNodes[0].textContent);
};
@ -642,10 +642,10 @@ function lococtrl_show(name) {
var win = document.getElementById("lococtrl_"+name);
var i;
debug ("lococtrl_show:" + name);
console.log ("lococtrl_show:" + name);
if (!win) {
debug ("locolist_show create window");
console.log ("locolist_show create window");
win = gWindowCreate("lococtrl_"+name, "Loco:"+name, 600, 600, " \
<table><tr><td> \
<fieldset><legend>Speed</legend><table><tr><td align=center>\
@ -789,7 +789,7 @@ function lococtrl_cb_btnmove () {
if (reverse.innerHTML == "REV") speed = 0 - speed;
locomotive_server_Set ({name: name, speed: speed});
debug ("Locomotive: '" + name +"' Speed: " + speed);
console.log ("Locomotive: '" + name +"' Speed: " + speed);
};
@ -800,7 +800,7 @@ function lococtrl_speed() {
let speed = this.value;
if (reverse.innerHTML == "REV") speed = 0 - speed;
debug ("Speed Loco:'"+name+"' Speed:'"+speed+"'");
console.log ("Speed Loco:'"+name+"' Speed:'"+speed+"'");
for (var i = 0; i < locomotives.length; i++) {
if (name == locomotives[i].name) {
locomotive_server_Set ({name: name, speed: speed});
@ -821,7 +821,7 @@ function lococtrl_setData(data) {
var btnautorand = document.getElementById("lococtrl_"+data.name+"_btnrand");
if (range && reverse) {
debug ("lococtrl: " + data.name + " speed:" + data.speed + " vmax:" +
console.log ("lococtrl: " + data.name + " speed:" + data.speed + " vmax:" +
data.vmax + " flags:" + data.flags);
if (data.flags & LOCO_F_REVERSE) reverse.innerHTML = "REV";
else reverse.innerHTML = "FWD";
@ -857,7 +857,7 @@ function lococtrl_setData(data) {
function lococtrl_close() {
debug ("LocoCtrl_close:" + this.value);
console.log ("LocoCtrl_close:" + this.value);
var win = document.getElementById("lococtrl_"+this.value);
if (win) document.body.removeChild(win);

@ -20,14 +20,14 @@ const TURNOUT_F_ISRELAIS = 8;
function rwdetail_requestcallback(response) {
debug ("rwdetail_requestcallback");
console.log ("rwdetail_requestcallback");
};
function rwdetail_request(posx, posy) {
var request = {locoid: locoID, parameter1: -1, name:"Otto"};
debug ("rwdetail_request");
console.log ("rwdetail_request");
serverinout(request, rwdetail_requestcallback);
};
@ -35,10 +35,10 @@ function rwdetail_request(posx, posy) {
function rwdetail_show(posx, posy) {
var win = document.getElementById("rwdetail");
debug ("rwdetail_show");
console.log ("rwdetail_show");
if (!win) {
debug ("rwdetail_show create window");
console.log ("rwdetail_show create window");
win = gWindowCreate("rwdetail", "Railway", 400, 500, " \
<div style=\"float: left\"> \
Position: <input id=\"rwdet_X\" style=\"width: 50\" value=\"" + posx +"\"> , <input id=\"rwdet_Y\" style=\"width: 50\" value=\"" + posy +"\"> \
@ -101,10 +101,15 @@ function rwdetail_show(posx, posy) {
y.value = posy;
}
console.log ("rwdetail_show track dimensions: " + track.size.x + "," + track.size.y + " Position: " + posx + "," + posy + " idx:" + (posx + posy * track.size.x));
rwdetail_setData({type: 0, x: posx, y: posy, dir: 0, altdir: 0, name: ""});
if (track.elements[posx + posy * track.size.x]) {
console.log ("rwdetail_show element found.");
rwdetail_setData(track.elements[posx + posy * track.size.x]);
}
else console.log ("rwdetail_show element NOT found.");
};
@ -112,7 +117,7 @@ function rwdetail_cb_gotoref () {
var type = document.getElementById("rwdet_type");
var name = document.getElementById("rwdet_name");
debug ("Name:" + name.value + " Type:" + type.value);
console.log ("Name:" + name.value + " Type:" + type.value);
switch(Number(type.value)) {
case RAILWAY_T_BUTTON: turndetail_show(name.value, true); break; // button
@ -309,7 +314,7 @@ var turnouts = [];
function turnout_Update(data) {
for (var i = 0; i < turnouts.length; i++) {
if (data.name == turnouts[i].name) {
debug ("Update turnout:" + turnouts[i].name + " with turnout:" + data.name + " Flags:" + data.flags);
console.log ("Update turnout:" + turnouts[i].name + " with turnout:" + data.name + " Flags:" + data.flags);
turnouts[i].name = data.name;
turnouts[i].ifname = data.ifname;
turnouts[i].addr = data.addr;
@ -319,7 +324,7 @@ function turnout_Update(data) {
}
// not found add element
debug ("Add turnout:" + data.name + " Flags:" + data.flags);
console.log ("Add turnout:" + data.name + " Flags:" + data.flags);
turnouts.push ({
name: data.name,
ifname: data.ifname,
@ -404,10 +409,10 @@ function turnout_server_Activate(name, onoff) {
function turndetail_show(turnname, create) {
var win = document.getElementById("turndetail");
debug ("turndetail_show");
console.log ("turndetail_show");
if (!win) {
debug ("turndetail_show create window");
console.log ("turndetail_show create window");
win = gWindowCreate("turndetail", "Turnout", 400, 500, " \
<div style=\"float: left\"> \
Name: <input id=\"turndet_name\" style=\"width: 100\"> \
@ -575,7 +580,7 @@ function turndetail_cb_next () {
if (i == cursel) turndetail_setData(turnouts[i]);
}
// debug ("Cursel: " + cursel + " turnouts.lenght:" + turnouts.length);
// console.log ("Cursel: " + cursel + " turnouts.lenght:" + turnouts.length);
};
@ -598,7 +603,7 @@ function turndetail_cb_prev () {
if (i == cursel) turndetail_setData(turnouts[i]);
}
// debug ("Cursel: " + cursel + " turnouts.lenght:" + turnouts.length);
// console.log ("Cursel: " + cursel + " turnouts.lenght:" + turnouts.length);
};

@ -14,7 +14,7 @@ var sensors = [];
function sensor_Update(sdata) {
for (var i = 0; i < sensors.length; i++) {
if (sdata.name == sensors[i].name) {
debug ("Update Sensor:" + sensors[i].name + " with Sensor:" + sdata.name);
console.log ("Update Sensor:" + sensors[i].name + " with Sensor:" + sdata.name);
sensors[i].name = sdata.name;
sensors[i].ifname = sdata.ifname;
sensors[i].addr = sdata.addr;
@ -24,7 +24,7 @@ function sensor_Update(sdata) {
}
// not found add element
debug ("Add Sensor:" + sdata.name);
console.log ("Add Sensor:" + sdata.name);
sensors.push ({
name: sdata.name,
ifname: sdata.ifname,
@ -92,10 +92,10 @@ function sensor_IsActive(name) {
function sensordetail_show(name, create) {
var win = document.getElementById("sensordetail");
debug ("sensordetail_show");
console.log ("sensordetail_show");
if (!win) {
debug ("sensordetail_show create window");
console.log ("sensordetail_show create window");
win = gWindowCreate("sensordetail", "Sensor", 400, 300, " \
<div style=\"float: left\"> \
Sensor Name: <input id=\"sensor_name\" style=\"width: 100\"> \
@ -188,7 +188,7 @@ function sensordetail_cb_next () {
if (i == cursel) sensordetail_setData(sensors[i]);
}
debug ("Cursel: " + cursel + " sensors.lenght:" + sensors.length);
console.log ("Cursel: " + cursel + " sensors.lenght:" + sensors.length);
};
@ -211,7 +211,7 @@ function sensordetail_cb_prev () {
if (i == cursel) sensordetail_setData(sensors[i]);
}
debug ("Cursel: " + cursel + " sensors.lenght:" + sensors.length);
console.log ("Cursel: " + cursel + " sensors.lenght:" + sensors.length);
};
@ -262,10 +262,10 @@ function sensordetail_getData() {
function sensorlist_show() {
var win = document.getElementById("sensorlist");
debug ("sensorlist_show");
console.log ("sensorlist_show");
if (!win) {
debug ("sensorlist_show create window");
console.log ("sensorlist_show create window");
win = gWindowCreate("sensorlist", "Sensors", 400, 500, " \
<div id=\"sensorlist_listdiv\"> \
<ul id=\"sensorlist_elements\" style=\"list-style-type:none\"></ul> \
@ -306,7 +306,7 @@ function sensorlist_show() {
function sensorlist_clicked() {
var i;
debug ("childnodes: " + this.childNodes[0].textContent);
console.log ("childnodes: " + this.childNodes[0].textContent);
sensordetail_show(this.childNodes[0].textContent);
};
@ -361,7 +361,7 @@ function sensor_ctxmenu_Off (element, value) {
//
function sensor_server_setactive(name, value) {
var request = { command: "sensorSetActive", sensor: name, enabled: value };
debug ("send sensor active:" + name);
console.log ("send sensor active:" + name);
serverinout (request, serverinout_defaultCallback);
};

@ -105,7 +105,7 @@ function serverinout_defaultCallback(data) {
//
// Infoline changes
if (data.changes[i].infoline) {
debug ("Info:" + data.changes[i].infoline);
console.log ("Info:" + data.changes[i].infoline);
}
//
@ -181,7 +181,7 @@ function serverinout_defaultCallback(data) {
}
}
if (data.changes[i].block) {
debug ("update Block:"+ data.changes[i].block.name + " Flags:" + data.changes[i].block.flags);
console.log ("update Block:"+ data.changes[i].block.name + " Flags:" + data.changes[i].block.flags);
block_Update(data.changes[i].block);
}
if (data.changes[i].blockdelete) {
@ -202,11 +202,11 @@ function serverinout_defaultCallback(data) {
}
}
else {
debug ("ERROR: serverinout_defaultCallback");
console.log ("ERROR: serverinout_defaultCallback");
}
}
else {
debug ("ERROR: serverinout_defaultCallback no data.sid && data.rid");
console.log ("ERROR: serverinout_defaultCallback no data.sid && data.rid");
}
};
@ -220,7 +220,7 @@ function serverinout_AutoUpdateCallback(data) {
function serverinout_AutoUpdate() {
// debug ("serverinout_AutoUpdate");
// console.log ("serverinout_AutoUpdate");
if (request_running == 0) {
request_running = 0;
serverinout({}, serverinout_defaultCallback);

@ -11,7 +11,7 @@ function side_Display(type) {
var side_normal = document.getElementById("side_normalbuttons");
var btn = document.getElementById("cmd-none");
debug ("side_display(" + type +")");
console.log ("side_display(" + type +")");
if (type == SIDE_DISPLAY_EDITTRACK) {
side_normal.style.display = "none";

@ -3,7 +3,7 @@
//
function testwinbtnclick() {
debug ("Test Button");
console.log ("Test Button");
locodetail_show("");
}

@ -124,7 +124,7 @@ function trackDrawElement(ctx, element, mode) {
var altdir = element.altdir;
if (element.name != "") if (turnout_IsTurnoutActive(element.name)) {
// debug ("draw element:" + element.name + " isActive:" + turnout_IsActive(element.name));
// console.log ("draw element:" + element.name + " isActive:" + turnout_IsActive(element.name));
altdir = element.dir;
dir = element.altdir;
}
@ -293,7 +293,7 @@ function trackDrawBlock(ctx, blockelm) {
y1 = y1 + (blockelm.y) * track.scale;
y2 = y2 + (blockelm.y) * track.scale;
// debug ("Flags:" + Number(blockelm.flags) + " Res:" + (Number(blockelm.flags) & BLOCK_F_OFF));
// console.log ("Flags:" + Number(blockelm.flags) + " Res:" + (Number(blockelm.flags) & BLOCK_F_OFF));
if (block && Number(block.flags) & BLOCK_F_OFF) ctx.fillStyle = cssVar('--block-bg-closed');
else if (blockelm.lockedby && blockelm.lockedby != "") ctx.fillStyle = cssVar('--block-bg-locked');
else ctx.fillStyle = cssVar('--block-bg');
@ -383,7 +383,7 @@ function trackDraw() {
var elm = {};
var tmpblocks = new Array();
// debug ("trackDraw pos: " + trackMouse.pos.x + "," + trackMouse.pos.y +
// console.log ("trackDraw pos: " + trackMouse.pos.x + "," + trackMouse.pos.y +
// " down: " + trackMouse.down.x + "," + trackMouse.down.y);
@ -559,7 +559,7 @@ function trackMousemove(event) {
var mode = sideBtnCmdGet();
trackMouse.pos = trackMouseGetPos(event);
// debug ("trackMousemove pos: " + trackMouse.pos.x + "," + trackMouse.pos.y +
// console.log ("trackMousemove pos: " + trackMouse.pos.x + "," + trackMouse.pos.y +
// " subx: " + trackMouse.pos.subx + " suby:" + trackMouse.pos.suby);
trackDraw();
@ -577,7 +577,7 @@ function trackMousedown(event) {
if (trackMouse.step == 0) trackMouse.down = trackMouseGetPos(event);
}
// debug ("trackMousedown pos: " + tmp.x + "," + tmp.y + " subx: " + tmp.subx + " suby:" + tmp.suby);
// console.log ("trackMousedown pos: " + tmp.x + "," + tmp.y + " subx: " + tmp.subx + " suby:" + tmp.suby);
trackDraw();
};
@ -590,10 +590,10 @@ function trackMouseup(event) {
var mode = sideBtnCmdGet();
var tmp = trackMouseGetPos(event);
debug ("trackMouseup tmp: " + tmp.x + "," + tmp.y + " mode:" + mode);
debug ("trackMouseup down: " + trackMouse.down.x + "," + trackMouse.down.y);
debug ("trackMouseup pos: " + trackMouse.pos.x + "," + trackMouse.pos.y);
debug ("trackMouseup step: " + trackMouse.step);
console.log ("trackMouseup tmp: " + tmp.x + "," + tmp.y + " mode:" + mode);
console.log ("trackMouseup down: " + trackMouse.down.x + "," + trackMouse.down.y);
console.log ("trackMouseup pos: " + trackMouse.pos.x + "," + trackMouse.pos.y);
console.log ("trackMouseup step: " + trackMouse.step);
gContextmenuClose();
@ -693,7 +693,7 @@ function trackMouseup(event) {
}
else {
debug ("rw_Click was das?");
console.log ("rw_Click was das?");
rw_Click(trackMouse.pos.x, trackMouse.pos.y);
trackMouse.down.x = -1;
trackMouse.down.y = -1;
@ -707,10 +707,10 @@ function trackMouseup(event) {
// add/or delete element
// fill in element
function trackAddElement(elm) {
// debug ("trackAddElement: pos:" + elm.x + "," + elm.y + " d: " + elm.dir + " name:" + elm.name + " type:" + elm.type);
// console.log ("trackAddElement: pos:" + elm.x + "," + elm.y + " d: " + elm.dir + " name:" + elm.name + " type:" + elm.type);
if (track.size.x > 0 && track.size.y > 0) {
track.elements[elm.x + track.size.y * elm.y] = elm;
track.elements[elm.x + track.size.x * elm.y] = elm;
}
};
@ -720,7 +720,7 @@ function trackAddElement(elm) {
// init the track view screen
// bind callback functions
function trackCreate(sizex, sizey) {
debug ("trackCreate " + sizex + " , " + sizey);
console.log ("trackCreate " + sizex + " , " + sizey);
var canvas = document.createElement("canvas");
track.size.x = sizex;
@ -746,7 +746,7 @@ function trackCreate(sizex, sizey) {
//
// get the size fo track from server, setup all data
function trackSetup(tracksetup) {
debug ("trackSetup");
console.log ("trackSetup");
var client = document.getElementById("page_main");
var oldc = document.getElementById("TrackCanvas");
@ -838,7 +838,7 @@ function trackGetElementList(start, end) {
}
else {
// should not possible but somehow we ended up here
debug ("trackGetElementList: ERROR elm 3 or 5 expected");
console.log ("trackGetElementList: ERROR elm 3 or 5 expected");
break;
}
}
@ -861,7 +861,7 @@ function trackGetElementList(start, end) {
}
else {
// should not possible but somehow we ended up here
debug ("trackGetElementList: ERROR elm 4 or 6 expected");
console.log ("trackGetElementList: ERROR elm 4 or 6 expected");
break;
}
}

Loading…
Cancel
Save