score:0

Accepted answer

a partial answer is to add delay before removing tags, as proposed above. this can be done on the node variable with:

.on("mouseout", function(d) {
    d3.select("#"+d.name).selectall(".tool")
    .transition()
    .delay(800)
    .remove();
})

it's also better to reduce the overlap between tags and parent node (in drawtags) because mouseover is on the parent node only, tags are considered out.

var x = math.sin(rscale(d))*50; // vs. 40px previously
var y = math.cos(rscale(d))*50;

change the mouseover event on tags to a click event and make tags and text only receive click pointer-events with .attr("pointer-events", "click")

.on("click", function(d) { alert(d); });

Related Query