Add background tooltips to label, not list item

(closes #3581)

This is to avoid conflicting with the tooltip on the custom button,
which is a descendent of the list item.
This commit is contained in:
Bryan Housel
2016-11-13 20:40:06 -05:00
parent a2933bc42d
commit 3667541b2a
+3 -3
View File
@@ -59,7 +59,7 @@ export function uiBackground(context) {
function setTooltips(selection) {
selection.each(function(d, i, nodes) {
var item = d3.select(this),
var item = d3.select(this).select('label'),
placement = (i < nodes.length / 2) ? 'bottom' : 'top';
if (d === previous) {
@@ -76,8 +76,8 @@ export function uiBackground(context) {
.placement(placement)
.title(d.description)
);
// } else {
// item.call(tooltip().destroy);
} else {
item.call(tooltip().destroy);
}
});
}