diff --git a/css/style_dark.css b/css/style_dark.css index 5ad58b3..498272e 100644 --- a/css/style_dark.css +++ b/css/style_dark.css @@ -84,7 +84,7 @@ thead, #networkMenu { position: relative; /* overflow: auto;*/ overflow-x: hidden; - overflow-y: scroll; + overflow-y: auto; } /* tertiary highlight selection */ diff --git a/js/Graph.js b/js/Graph.js index df70833..c7b7534 100644 --- a/js/Graph.js +++ b/js/Graph.js @@ -182,7 +182,11 @@ NodeArray.prototype = { }, find : function(key) { - return this.contents[key]; + if (key in this.contents) + return this.contents[key]; + else + console.log('no item matching key:', key); + return null; } }; diff --git a/webmapper.py b/webmapper.py index 5cbff56..68bae4f 100644 --- a/webmapper.py +++ b/webmapper.py @@ -172,6 +172,8 @@ def map_props(map): def on_device(type, dev, event): # print('ON_DEVICE:', event, dev) + if dev['is_local']: + return dev = dev_props(dev) if event == mpr.Graph.Event.NEW or event == mpr.Graph.Event.MODIFIED: new_devs[dev['key']] = dev @@ -181,6 +183,8 @@ def on_device(type, dev, event): def on_signal(type, sig, event): # print('ON_SIGNAL:', event) + if sig['is_local']: + return sig = sig_props(sig) if event == mpr.Graph.Event.NEW or event == mpr.Graph.Event.MODIFIED: new_sigs[sig['key']] = sig @@ -188,7 +192,9 @@ def on_signal(type, sig, event): del_sigs[sig['key']] = sig def on_map(type, map, event): -# print('ON_MAP:', event) +# print('ON_MAP:', event, type, map) + if map['is_local']: + return map = map_props(map) if event == mpr.Graph.Event.NEW or event == mpr.Graph.Event.MODIFIED: new_maps[map['key']] = map