From 2a91111ac0b93427ae87ede4b29cdbe2731fa43f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 27 Jun 2019 16:15:53 +0200 Subject: [PATCH] fix: Make orphan.url node non-clickable. Fix #32 --- website/web/static/tree.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/website/web/static/tree.js b/website/web/static/tree.js index 2802b571..d1d1680c 100644 --- a/website/web/static/tree.js +++ b/website/web/static/tree.js @@ -344,15 +344,18 @@ function text_entry(relative_x_pos, relative_y_pos, onclick_callback, d) { .style("font-size", "16px") .attr("stroke-width", ".2px") .style("opacity", .9) - .attr('cursor', 'pointer') .attr("clip-path", "url(#textOverlay)") .text(d => { if (d.data.urls_count) { return d.data.name + ' (' + d.data.urls_count + ')' } return d.data.name - }) - .on('click',onclick_callback); + }); + if (d.data.name != 'orphan.url'){ + text_nodes + .attr('cursor', 'pointer') + .on('click', onclick_callback); + }; return nodeContent.node(); }