Skip to content

Commit

Permalink
Fixed scrollbar ugliness and hide local device and signals.
Browse files Browse the repository at this point in the history
  • Loading branch information
malloch committed Sep 12, 2024
1 parent 087b3a8 commit 1bd79c5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion css/style_dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ thead, #networkMenu {
position: relative;
/* overflow: auto;*/
overflow-x: hidden;
overflow-y: scroll;
overflow-y: auto;
}

/* tertiary highlight selection */
Expand Down
6 changes: 5 additions & 1 deletion js/Graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};

Expand Down
8 changes: 7 additions & 1 deletion webmapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -181,14 +183,18 @@ 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
elif event == mpr.Graph.Event.REMOVED:
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
Expand Down

0 comments on commit 1bd79c5

Please sign in to comment.