diff --git a/web/client/static/graph.js b/web/client/static/graph.js index 7ae1bad1..ff511506 100644 --- a/web/client/static/graph.js +++ b/web/client/static/graph.js @@ -87,16 +87,30 @@ Graph.prototype.inLineage = function(addr, qaddr, seen) { return false; }; +var gPos = {}; + // this runs sugiyama... Graph.prototype.render = function() { + var name = Object.keys(this.vertices).toString(); var send = "digraph graphname {\n"; + // record the old gbox position + var oldgbox = $("#gbox"); + if (oldgbox.length > 0) { + gPos[oldgbox[0].className] = [fdec(oldgbox.css("margin-left")), fdec(oldgbox.css("margin-top"))]; + } + var outergbox = $('
'); $("#staticpanel").html(""); gbox = document.createElement('div'); outergbox[0].appendChild(gbox); document.getElementById("staticpanel").appendChild(outergbox[0]); gbox.id = 'gbox'; + gbox.className = name; + if (name in gPos) { + $("#gbox").css("margin-left", gPos[name][0]); + $("#gbox").css("margin-top", gPos[name][1]); + } for (addr in this.vertices) { var r = this.vertices[addr].rendered; diff --git a/web/index.html b/web/index.html index b6b94357..a212b5ea 100644 --- a/web/index.html +++ b/web/index.html @@ -54,3 +54,4 @@
+