Skip to content

Commit

Permalink
fix(tooltip): destory when reapply (#5601)
Browse files Browse the repository at this point in the history
  • Loading branch information
pearmini authored Sep 26, 2023
1 parent 832696b commit b4c977f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/interaction/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,6 @@ export function tooltip(
root.removeEventListener('pointermove', pointerover);
root.removeEventListener('pointerout', pointerout);
}
destroyTooltip({ root, single });
};

const onTooltipShow = ({ nativeEvent, data }) => {
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/plot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ function updateTooltip(
container: selection.node(),
update: (options) => Promise.resolve(options),
};
const newTooltip = applyTooltip(target, [], context.emitter);
nameInteraction.set('tooltip', newTooltip);
const destroy = applyTooltip(target, [], context.emitter);
nameInteraction.set('tooltip', { destroy });
}

async function initializeView(
Expand Down

0 comments on commit b4c977f

Please sign in to comment.