From 3667541b2a247b69c11987a31d77411fb565b797 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sun, 13 Nov 2016 20:40:06 -0500 Subject: [PATCH] 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. --- modules/ui/background.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ui/background.js b/modules/ui/background.js index 8a92c53cf..e03309588 100644 --- a/modules/ui/background.js +++ b/modules/ui/background.js @@ -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); } }); }