GUI -- Added global key bindings mechanism
- 'T' now toggles theme (light/dark) -- mast CSS done, other CSS to do
- 'ESC' now closes alerts box if it is open
- Minor cleanup to topo2.js
Change-Id: I506a6add4299a6c03dcb717c33394ad94be26997
diff --git a/web/gui/src/main/webapp/topo2.js b/web/gui/src/main/webapp/topo2.js
index fc7c35a..fff829f 100644
--- a/web/gui/src/main/webapp/topo2.js
+++ b/web/gui/src/main/webapp/topo2.js
@@ -117,7 +117,7 @@
S: injectStartupEvents, // TODO: remove (testing only)
space: injectTestEvent, // TODO: remove (testing only)
- B: toggleBg,
+ B: toggleBg, // TODO: do we really need this?
L: cycleLabels,
P: togglePorts,
U: unpin,
@@ -135,7 +135,6 @@
webSock,
labelIdx = 0,
- //selected = {},
selectOrder = [],
selections = {},
@@ -788,8 +787,9 @@
if (d.class === 'device') {
d.fixed = true;
d3.select(self).classed('fixed', true);
- tellServerCoords(d);
- // TODO: send new [x,y] back to server, via websocket.
+ if (config.useLiveData) {
+ tellServerCoords(d);
+ }
}
}