forked from protonphoton/LJ
webui simu with colors
This commit is contained in:
parent
4bacb00395
commit
b6909e4490
8 changed files with 53 additions and 41 deletions
16
webui/LJ.js
16
webui/LJ.js
|
|
@ -98,22 +98,18 @@
|
|||
case "/statu":
|
||||
_WS.showstatus(e.data.slice(8));
|
||||
break;
|
||||
case "/plfra":
|
||||
console.log(e.data.slice(11));
|
||||
pl = e.data.slice(9);
|
||||
//console.log(pl);
|
||||
case "/simul":
|
||||
pl = e.data.slice(7);
|
||||
pl2 = eval(pl.replace(/[()]/g, ''));
|
||||
//console.log(pl2);
|
||||
break;
|
||||
case "/plpoi":
|
||||
case "/plpoi":
|
||||
//console.log("plpoint");
|
||||
break;
|
||||
default:
|
||||
//console.log(res[0] + " " + res[1])
|
||||
//console.log(res[1])
|
||||
default:
|
||||
document.getElementById(res[0].slice(1)).value = res[1];
|
||||
_WS.showin(e.data);
|
||||
}
|
||||
_WS.showin(e.data);
|
||||
|
||||
},
|
||||
onError: function (e) {
|
||||
_WS.showin('<span style="color: red;">ERROR:</span> ' + e.data);
|
||||
|
|
|
|||
|
|
@ -560,10 +560,13 @@
|
|||
// Draw Lines
|
||||
for (var i = 0; i < pl2.length/3; i++) {
|
||||
ctx.lineTo(pl2[i*3]*0.7, pl2[1+(i*3)]*0.7);
|
||||
//ctx.strokeStyle = "#"+(pl2[2+(i*3)]).toString(16);
|
||||
ctx.strokeStyle = "#"+((pl2[2+(i*3)]) + Math.pow(16, 6)).toString(16).slice(-6);
|
||||
ctx.stroke();
|
||||
}
|
||||
|
||||
ctx.strokeStyle = "#888";
|
||||
ctx.stroke();
|
||||
//ctx.strokeStyle = "#888";
|
||||
//ctx.stroke();
|
||||
lastpoint.x = pl2[i*3];
|
||||
lastpoint.y = pl2[1+(i*3)];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue