mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
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:
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user