Properly update undo/redo button tooltips when undoing/redoing (close #6872)

This commit is contained in:
Quincy Morgan
2019-12-23 11:06:23 -05:00
parent dcf77236a4
commit ae7eadb89c
2 changed files with 13 additions and 2 deletions
+2 -2
View File
@@ -97,8 +97,8 @@ export function uiToolUndoRedo(context) {
})
.each(function() {
var selection = d3_select(this);
if (selection.property('tooltipVisible')) {
selection.call(tooltipBehavior.show);
if (!selection.select('.tooltip.in').empty()) {
selection.call(tooltipBehavior.updateContent);
}
});
}
+11
View File
@@ -81,6 +81,10 @@ export function popover(klass) {
_anchorSelection.each(show);
};
popover.updateContent = function() {
_anchorSelection.each(updateContent);
};
popover.hide = function() {
_anchorSelection.each(hide);
};
@@ -198,6 +202,13 @@ export function popover(klass) {
popoverSelection.node().focus();
}
anchor.each(updateContent);
}
function updateContent() {
var anchor = d3_select(this);
var popoverSelection = anchor.selectAll('.popover-' + _id);
if (_content) popoverSelection.selectAll('.popover-inner').call(_content.apply(this, arguments));
updatePosition.apply(this, arguments);