Skip to content

Commit

Permalink
fix(tooltip): dispatch axis pointer action only when trigger is axis
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzisen committed Jan 23, 2025
1 parent 3a225c3 commit 6cf6895
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/component/tooltip/TooltipView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,13 @@ class TooltipView extends ComponentView {
else if (payload.x != null && payload.y != null) {
// FIXME
// should wrap dispatchAction like `axisPointer/globalListener` ?
api.dispatchAction({
type: 'updateAxisPointer',
x: payload.x,
y: payload.y
});
if (tooltipModel.option.trigger === 'axis') {
api.dispatchAction({
type: 'updateAxisPointer',
x: payload.x,
y: payload.y
});
}

this._tryShow({
offsetX: payload.x,
Expand Down

0 comments on commit 6cf6895

Please sign in to comment.