GUI -- TopoView - implemented show/hide background map ('B' keystroke)
- reworked SvgUtilService.makeVisible() to be dual-purpose .visible(el, [b]) method.
Change-Id: I8e68994627d1022066cdc9dcbed006675431d91a
diff --git a/web/gui/src/main/webapp/app/view/topo/topo.js b/web/gui/src/main/webapp/app/view/topo/topo.js
index c413347..00b06d5 100644
--- a/web/gui/src/main/webapp/app/view/topo/topo.js
+++ b/web/gui/src/main/webapp/app/view/topo/topo.js
@@ -48,7 +48,7 @@
H: [tfs.toggleHosts, 'Toggle host visibility'],
M: [tfs.toggleOffline, 'Toggle offline visibility'],
- //B: [toggleBg, 'Toggle background image'],
+ B: [toggleMap, 'Toggle background map'],
//P: togglePorts,
//X: [toggleNodeLock, 'Lock / unlock node positions'],
@@ -94,6 +94,10 @@
tfs.updateDeviceColors();
}
+ function toggleMap() {
+ sus.visible(mapG, !sus.visible(mapG));
+ }
+
function resetZoom() {
zoomer.reset();
}
@@ -184,7 +188,7 @@
}
function showNoDevs(b) {
- sus.makeVisible(noDevsLayer, b);
+ sus.visible(noDevsLayer, b);
}
function showCallibrationPoints() {