initialize_map: function() {
this.nodes = [];
+ this.id = 0;
},
refresh: function() {
on_all_new_record: function(n) {
// format is : [name, x, y, z, uid, state]
// state = "Busy", "Alive" or "Down"
- node = [42, n.x, n.y, n.z, "bb40", "Alive"];
+ this.id++;
+ node = [this.id, n.x, n.y, n.z, this.id, "Alive"];
this.nodes.push(node);
+ console.log("node id " + this.id);
},
on_all_query_done: function() {
<div id="div3d" oncontextmenu="return false;"></div>
<div id="infobox"></div>
<div style="text-align:right">
- <img id="node_alive"> Alive -
- <img id="node_down"> Down -
- <img id="node_selected"> Selected -
- <img id="node_used"> Busy
+ <div id="node_alive"></div> Alive -
+ <div id="node_down"></div> Down -
+ <div id="node_selected"></div> Selected -
+ <div id="node_used"></div> Busy
</div>
</div>
</div>