GUI -- TopoView - Re-instated the oblique view function. (Keystroke 'Z').
Change-Id: I1bc4c11590660142a6bc9f5f71c06a664dbfa80b
diff --git a/web/gui/src/main/webapp/app/view/topo/topoForce.js b/web/gui/src/main/webapp/app/view/topo/topoForce.js
index 80a7b63..e2d1809 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoForce.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoForce.js
@@ -76,7 +76,6 @@
hostLabelIndex = 0, // for host label cycling
showHosts = false, // whether hosts are displayed
showOffline = true, // whether offline devices are displayed
- oblique = false, // whether we are in the oblique view
nodeLock = false, // whether nodes can be dragged or not (locked)
dim; // the dimensions of the force layout [w,h]
@@ -965,13 +964,13 @@
// force layout tick function
function fResume() {
- if (!oblique) {
+ if (!tos.isOblique()) {
force.resume();
}
}
function fStart() {
- if (!oblique) {
+ if (!tos.isOblique()) {
force.start();
}
}
@@ -1084,10 +1083,23 @@
}
}
- function mkObliqueApi(uplink) {
+ function mkObliqueApi(uplink, fltr) {
return {
+ force: function() { return force; },
+ zoomLayer: uplink.zoomLayer,
+ nodeGBBox: function() { return nodeG.node().getBBox(); },
node: function () { return node; },
- link: function () { return link; }
+ link: function () { return link; },
+ linkLabel: function () { return linkLabel; },
+ nodes: function () { return network.nodes; },
+ tickStuff: tickStuff,
+ nodeLock: function (b) {
+ var old = nodeLock;
+ nodeLock = b;
+ return old;
+ },
+ opacifyMap: uplink.opacifyMap,
+ inLayer: fltr.inLayer
};
}
@@ -1140,7 +1152,7 @@
tms.initModel(mkModelApi(uplink), dim);
tss.initSelect(mkSelectApi(uplink));
tts.initTraffic(mkTrafficApi(uplink));
- tos.initOblique(mkObliqueApi(uplink));
+ tos.initOblique(mkObliqueApi(uplink, fltr));
fltr.initFilter(mkFilterApi(uplink), d3.select('#mast-right'));
settings = angular.extend({}, defaultSettings, opts);