From 4bf42ddabab613026b01089c066415179a2e09b7 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Tue, 5 May 2015 10:31:37 +0300 Subject: client: fix Image overlapping link icon. fix #503 --- src/client/view/graph_view.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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"); -- cgit v1.3.1