2 var SensLabMap = Plugin.extend({
3 init: function(options, element) {
4 this._super(options, element);
6 this.elmt().on('show', this, this.on_show);
8 this.method = query.object;
10 /* Setup query and record handlers */
11 this.listen_query(options.query_uuid);
12 this.listen_query(options.query_all_uuid, 'all');
14 /* GUI setup and event binding */
15 this.initialize_map();
18 initialize_map: function() {
23 console.log("refresh");
27 on_show: function(e) {
31 on_all_new_record: function(n) {
32 // format is : [name, x, y, z, uid, state]
33 // state = "Busy", "Alive" or "Down"
34 node = [42, n.x, n.y, n.z, "bb40", "Alive"];
35 this.nodes.push(node);
38 on_all_query_done: function() {
44 $.plugin('SensLabMap', SensLabMap);