Destroy all old background layer tooltips before making new ones

(closes #5551)
This commit is contained in:
Bryan Housel
2018-12-05 00:35:45 -05:00
parent 4bfc78c69b
commit bee01d8497
2 changed files with 12 additions and 4 deletions
+2 -2
View File
@@ -52,6 +52,8 @@ export function uiBackground(context) {
var description = d.description();
var isOverflowing = (span.property('clientWidth') !== span.property('scrollWidth'));
item.call(tooltip().destroyAny);
if (d === _previousBackground) {
item.call(tooltip()
.placement(placement)
@@ -66,8 +68,6 @@ export function uiBackground(context) {
.placement(placement)
.title(description || d.name())
);
} else {
item.call(tooltip().destroy);
}
});
}