diff options
| author | Alon Levy <alon@pobox.com> | 2015-04-16 00:01:18 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-04-16 00:01:18 +0200 |
| commit | 35d6590983da1d669299839e5ebf49228c0aba87 (patch) | |
| tree | 97e53a6227305e21d75bccd29c86c80b7aaeea46 /src/client | |
| parent | c1f54590ceb39e798d79bedb2c8246ae5e395272 (diff) | |
client: image-url: bigger radius
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/view/graph_view.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js index 74d1ed95..48485c9c 100644 --- a/src/client/view/graph_view.js +++ b/src/client/view/graph_view.js @@ -447,7 +447,7 @@ function GraphView(spec) { } var node__text_x = function(d) { - return node_text_dx + (urlValid(d.url) ? node_url_dx : 0); + return node_text_dx + node__radius(d) + (urlValid(d.url) ? node_url_dx : 0); } function model_id_from_dom_id(dom_id) { @@ -744,7 +744,9 @@ function GraphView(spec) { } } - var node_circle_radius = 10; + function node__radius (d) { + return urlValid(d['image-url']) ? 20 : 10; + } function filter_id(id) { return id + '__node_filter'; } @@ -787,7 +789,7 @@ function GraphView(spec) { .append('clipPath') .attr('id', function (d) { return clip_path_id(d.id); }) .append('circle') - .attr('r', node_circle_radius) + .attr('r', node__radius) .attr('cx', 0) .attr('cy', 0); circle = nodeEnter.insert("circle"); @@ -795,9 +797,7 @@ function GraphView(spec) { .attr("class", function(d) { return d.type + " " + d.state + " circle graph"; }) - .attr("r", function(d) { - return node_circle_radius; - }) + .attr("r", node__radius) .attr("filter", function (d) { return urlImage(d['image-url']) ? svg_url(filter_id(d.id)) : ''; }) |
