diff --git a/modules/ui/tools/undo_redo.js b/modules/ui/tools/undo_redo.js index 0974a0d15..b39ff390d 100644 --- a/modules/ui/tools/undo_redo.js +++ b/modules/ui/tools/undo_redo.js @@ -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); } }); } diff --git a/modules/util/popover.js b/modules/util/popover.js index 679db193a..19dde71b4 100644 --- a/modules/util/popover.js +++ b/modules/util/popover.js @@ -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);