Skip to content

Commit

Permalink
fix(tooltip): destory when reapply
Browse files Browse the repository at this point in the history
  • Loading branch information
pearmini committed Sep 26, 2023
1 parent 832696b commit 1cb63b8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 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
2 changes: 1 addition & 1 deletion src/runtime/plot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ function updateTooltip(
update: (options) => Promise.resolve(options),
};
const newTooltip = applyTooltip(target, [], context.emitter);
nameInteraction.set('tooltip', newTooltip);
nameInteraction.set('tooltip', { destroy: newTooltip });
}

async function initializeView(
Expand Down

0 comments on commit 1cb63b8

Please sign in to comment.