aboutsummaryrefslogtreecommitdiffstats
path: root/html
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2015-01-10 15:49:33 +0000
committerAdam Spiers <git@adamspiers.org>2015-01-10 15:49:33 +0000
commit988ff0b63278fe762d235f69d672c7311a854575 (patch)
tree0002c746ac3d7b90c6d122be6744479bbb7e59a8 /html
parent19124031aca457ba9ed9d4c5dca47a3cf0fe24e8 (diff)
downloadgit-deps-988ff0b63278fe762d235f69d672c7311a854575.tar.gz
add commented code including deps in tooltip
Won't use for now, but might be a nice UI addition later for navigating between dependencies on large graphs by hyperlinking the dependencies within the tip.
Diffstat (limited to 'html')
-rw-r--r--html/js/git-deps-graph.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/html/js/git-deps-graph.js b/html/js/git-deps-graph.js
index ff396df..a239a42 100644
--- a/html/js/git-deps-graph.js
+++ b/html/js/git-deps-graph.js
@@ -340,8 +340,18 @@ function tip_html(d) {
var pre = top.find(".commit-body pre").text(d.body);
if (options.debug) {
+ // var deps = gdd.deps[d.sha1];
+ // if (deps) {
+ // deps = Object.keys(deps);
+ // var sha1s = $.map(deps, function (sha1, i) {
+ // var node = gdd.node(sha1);
+ // return node.name;
+ // });
+ // top.append("<br />Dependencies: " + sha1s.join(", "));
+ // }
+
var index = gdd.node_index[d.sha1];
- var debug = "node index: " + index;
+ var debug = "<br />node index: " + index;
var dagre_node = gdl.g.graph.node(d.sha1);
debug += "<br />dagre: (" + dagre_node.x + ", " + dagre_node.y + ")";
top.append(debug);