Skip to content

Commit

Permalink
fix: fix offset of tooltip, fix #3666
Browse files Browse the repository at this point in the history
  • Loading branch information
xile611 committed Jan 14, 2025
1 parent 4d14fd5 commit 0240bf2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,12 @@ export abstract class BaseTooltipHandler extends BasePlugin implements ITooltipH
protected _getDefaultOption(): ITooltipHandlerOptions {
const { offset } = this._component.getSpec();

return offset ? { ...DEFAULT_OPTIONS, ...offset } : DEFAULT_OPTIONS;
return offset
? {
offsetX: offset.x ?? DEFAULT_OPTIONS.offsetX,
offsetY: offset.y ?? DEFAULT_OPTIONS.offsetY
}
: DEFAULT_OPTIONS;
}

/**
Expand Down

0 comments on commit 0240bf2

Please sign in to comment.