Skip to content

Commit

Permalink
added node title tooltips for tree.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ned2 committed Jun 17, 2016
1 parent 897c3a8 commit dd8e59e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion viz/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ function render_tree(svg, tree) {
var g = svgelement("g");
var n = text(svg, node_str);
n.setAttributeNS(null, "title", tree.entity);

// add a title element for node tooltips
var title = svgelement('title');
title.innerHTML = tree.entity;
n.appendChild(title);

g.appendChild(n);

var daughters_wtot = wtot;
Expand Down Expand Up @@ -115,7 +121,7 @@ function render_tree(svg, tree) {
dtr_x += daughter.mywidth + DAUGHTER_HSPACE;
}
}

g.mywidth = wtot;
g.labelcenter = labelcenter;
g.labelheight = nh;
Expand Down

0 comments on commit dd8e59e

Please sign in to comment.