diff options
| author | Alon Levy <alon@pobox.com> | 2015-05-05 10:31:37 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-05-05 10:31:37 +0300 |
| commit | 4bf42ddabab613026b01089c066415179a2e09b7 (patch) | |
| tree | e767fae3bb1da14fa5c3fc89fca70019f561c620 | |
| parent | 1ab3ab57e0b786315d69f86270aec11f3650131d (diff) | |
client: fix Image overlapping link icon. fix #503
| -rw-r--r-- | src/client/view/graph_view.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js index f8482d60..6a9ba41b 100644 --- a/src/client/view/graph_view.js +++ b/src/client/view/graph_view.js @@ -728,7 +728,6 @@ function GraphView(spec) { var noderef = nodeEnter.insert('a') .attr("class", "nodeurl graph") - .attr("transform", "translate(10,-7)") .attr("dy", node_text_dy); noderef.insert("image"); @@ -737,7 +736,10 @@ function GraphView(spec) { .attr("xlink:title", function (d) { return d.url; }) .attr("target", "_blank") .attr("visibility", function(d) { return urlValid(d.url) ? "visible" : "hidden"; }) - .attr("pointer-events", function(d) { return urlValid(d.url) ? "all" : "none"; }); + .attr("pointer-events", function(d) { return urlValid(d.url) ? "all" : "none"; }) + .attr("transform", function (d) { + return urlValid(d['image-url']) ? "translate(22,-7)" : "translate(10, -7)"; + }); node.select('g.node > a > image') .each(function () { load_image(this, "/static/img/url-icon.png"); |
