diff options
author | Adam Spiers <git@adamspiers.org> | 2015-01-06 19:22:28 +0000 |
---|---|---|
committer | Adam Spiers <git@adamspiers.org> | 2015-01-06 19:22:28 +0000 |
commit | 54bb17fd1ab138011fed86bd81a1352ea20925b9 (patch) | |
tree | 0f4b71bf097a307ec63791d6d37124b562080932 /html/js | |
parent | 3701ba3b4e414c6c59deb3745610a826c30aa4c6 (diff) | |
download | git-deps-54bb17fd1ab138011fed86bd81a1352ea20925b9.tar.gz |
make svg and fg global for debugging
Diffstat (limited to 'html/js')
-rw-r--r-- | html/js/git-deps-graph.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/html/js/git-deps-graph.js b/html/js/git-deps-graph.js index c03b3c4..f164e0d 100644 --- a/html/js/git-deps-graph.js +++ b/html/js/git-deps-graph.js @@ -7,12 +7,14 @@ var d3cola = cola.d3adaptor() .avoidOverlaps(true) .size([width, height]); +var svg, fg; + jQuery(function () { draw_graph(); }); function draw_graph () { - var svg = d3.select("body").append("svg") + svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height); @@ -22,7 +24,7 @@ function draw_graph () { .attr('height', "100%") .call(d3.behavior.zoom().on("zoom", redraw)); - var fg = svg.append('g'); + fg = svg.append('g'); function redraw() { fg.attr("transform", |