Skip to content

Commit

Permalink
Fix dotplot tooltip direction after #4548 regression
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Sep 27, 2024
1 parent 8d49fdd commit 343e755
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ export const DotplotTooltipClick = observer(function ({
const y = (mousedownClient?.[1] || 0) - (ydistance < 0 ? 0 : 0)

return mousedown && Math.abs(xdistance) > 3 && Math.abs(ydistance) > 3 ? (
<BaseTooltip clientPoint={{ x, y }}>
<BaseTooltip
placement={xdistance < 0 ? 'right' : 'left'}
clientPoint={{ x, y }}
>
{`x - ${locstr(mousedown[0], hview)}`}
<br />
{`y - ${locstr(viewHeight - mousedown[1], vview)}`}
Expand Down

0 comments on commit 343e755

Please sign in to comment.