From dc0b13d527871e8c7f0307bb60aa06432832e79b Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Mon, 9 Mar 2015 16:10:13 +0200 Subject: client: graph_view: update image href+width+height on every "frame" --- src/client/view/graph_view.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/client/view') diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js index 97830889..42da39aa 100644 --- a/src/client/view/graph_view.js +++ b/src/client/view/graph_view.js @@ -435,10 +435,7 @@ function GraphView(spec) { .attr("class", "nodeurl graph") .attr("transform", "translate(10,-7)") .attr("dy", node_text_dy); - noderef.insert("image") - .attr("width", "14") - .attr("height", "14") - .attr("xlink:href", "/static/img/url-icon.png"); + noderef.insert("image"); var urlValid = function(d) { return d.url !== undefined && d.url !== null && d.url.length > 0; @@ -470,7 +467,10 @@ function GraphView(spec) { .attr("pointer-events", function(d) { return urlValid(d) ? "all" : "none"; }); node.select('g.node text') .attr("dx", nodeTextX); - + node.select('g.node a image') + .attr("width", "14") + .attr("height", "14") + .attr("xlink:href", "/static/img/url-icon.png"); circle = nodeEnter.insert("circle"); node.select('g.node circle') .attr("class", function(d) { -- cgit v1.3.1