diff --git a/js/tree-reusable-d3.js b/js/tree-reusable-d3.js index 2141edbd..3e794036 100644 --- a/js/tree-reusable-d3.js +++ b/js/tree-reusable-d3.js @@ -27,13 +27,14 @@ function interactive_tree() { return d.data.text; }, elementEquality=function (e,f){return identifierAccessor(e)==identifierAccessor(f);}, - tooltipBuilder=function(d) { - return "
"+ + tooltipBuilder=function(d, tooltipContainer) { + var c = "
"+ textAccessor(d)+ "
"+ "
"+ "Identifier: "+identifierAccessor(d)+ "
"; + tooltipContainer.html(c); }, preTreatmentOfLoadedTree=function(tree){return tree;}, tooltipEnabled=false, @@ -177,12 +178,12 @@ function interactive_tree() { }) .on("mouseover", function(d) { if (!tooltipEnabled) return; + tooltipBuilder(d, tooltip); tooltip .transition() .duration(200) .style("opacity", 1); tooltip - .html(tooltipBuilder(d)) .style("left", (d3.event.pageX+20) + "px") .style("top", (d3.event.pageY - 28) + "px"); })