aboutsummaryrefslogtreecommitdiffstats
path: root/html
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2015-01-18 19:57:12 +0000
committerAdam Spiers <git@adamspiers.org>2015-01-18 19:57:12 +0000
commit6eb8515ddf6a066081abc08cb16bc87ab990ba76 (patch)
tree858e4075d961fd5a34cf1bddaea64fcbe6e221b1 /html
parentc32ca285a833ad2fd81b3307095e6d0f74dbba82 (diff)
downloadgit-deps-6eb8515ddf6a066081abc08cb16bc87ab990ba76.tar.gz
let's use the Dagre starting positions anyway
Can't do any harm ...
Diffstat (limited to 'html')
-rw-r--r--html/js/git-deps-graph.coffee14
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)