diff options
author | Adam Spiers <git@adamspiers.org> | 2015-01-09 02:19:51 +0000 |
---|---|---|
committer | Adam Spiers <git@adamspiers.org> | 2015-01-09 02:19:51 +0000 |
commit | 4dabd89e5f6b60f03e1b7c6f33e4009a314b191d (patch) | |
tree | 3133a2769d7dffaf79b3ac12f7aa0eb06141e388 /html/js/git-deps-graph.js | |
parent | 8251166cf25c890dc519571ff14d4221385761eb (diff) | |
download | git-deps-4dabd89e5f6b60f03e1b7c6f33e4009a314b191d.tar.gz |
rename MARGIN to RECT_MARGIN
Diffstat (limited to 'html/js/git-deps-graph.js')
-rw-r--r-- | html/js/git-deps-graph.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/html/js/git-deps-graph.js b/html/js/git-deps-graph.js index 63b7eab..21cde9e 100644 --- a/html/js/git-deps-graph.js +++ b/html/js/git-deps-graph.js @@ -1,7 +1,7 @@ var WIDTH = 960, HEIGHT = 800, - MARGIN = 14, // space in between <rects> - PADDING = 5, // space in between <text> label and <rect> border + RECT_MARGIN = 14, // space in between <rects> + PADDING = 5, // space in between <text> label and <rect> border EDGE_ROUTING_MARGIN = 3; var color = d3.scale.category20(); @@ -331,8 +331,8 @@ function draw_nodes(fg, node) { // Now set the node width/height as used by cola for // positioning. This has to include the margin // outside the rectangle. - d.width = d.rect_width + 2 * MARGIN; - d.height = d.rect_height + 2 * MARGIN; + d.width = d.rect_width + 2 * RECT_MARGIN; + d.height = d.rect_height + 2 * RECT_MARGIN; }); position_nodes(rect, label, tip); @@ -413,7 +413,7 @@ function tick_handler() { // overlap. The innerBounds property seems to tell // cola the Rectangle which is the visible part of the // node, minus any blank margin. - d.innerBounds = d.bounds.inflate(-MARGIN); + d.innerBounds = d.bounds.inflate(-RECT_MARGIN); }); node.attr("transform", function (d) { |