diff options
Diffstat (limited to 'html')
-rw-r--r-- | html/js/git-deps-graph.coffee | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/html/js/git-deps-graph.coffee b/html/js/git-deps-graph.coffee index e7b7530..6461547 100644 --- a/html/js/git-deps-graph.coffee +++ b/html/js/git-deps-graph.coffee @@ -199,12 +199,14 @@ draw_graph = (commitish) -> g_enter = nodes.enter().append("g") .attr("class", "node") - # Failed attempt to use dagre layout as starting positions - # https://github.com/tgdwyer/WebCola/issues/63 - # .each((d, i) -> - # n = gdl.node d.sha1 - # d.x = n.x - # d.y = n.y + # Questionable attempt to use dagre layout as starting positions + # https://github.com/tgdwyer/WebCola/issues/63 + nodes.each (d, i) -> + n = gdl.node d.sha1 + d.x = n.x + d.y = n.y + nodes.attr "transform", (d) -> + translate d.x, d.y # N.B. has to be done on the update selection, i.e. *after* the enter! nodes.call(d3cola.drag) |