Skip to content

Commit

Permalink
feat(sankey): restore previous tooltip positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
plouc committed Jun 26, 2020
1 parent 611a72b commit 7666935
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/sankey/src/SankeyLinksItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ const SankeyLinksItem = ({
const handleMouseEnter = useCallback(
event => {
setCurrent(link)
showTooltipFromEvent(tooltipContent, event)
showTooltipFromEvent(tooltipContent, event, 'left')
},
[setCurrent, link, showTooltipFromEvent, tooltipContent]
)

const handleMouseMove = useCallback(
event => {
showTooltipFromEvent(tooltipContent, event)
showTooltipFromEvent(tooltipContent, event, 'left')
},
[showTooltipFromEvent, tooltipContent]
)
Expand Down
4 changes: 2 additions & 2 deletions packages/sankey/src/SankeyNodesItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ const SankeyNodesItem = ({
const handleMouseEnter = useCallback(
event => {
setCurrent(node)
showTooltipFromEvent(tooltipContent, event)
showTooltipFromEvent(tooltipContent, event, 'left')
},
[setCurrent, node, showTooltipFromEvent, tooltipContent]
)

const handleMouseMove = useCallback(
event => {
showTooltipFromEvent(tooltipContent, event)
showTooltipFromEvent(tooltipContent, event, 'left')
},
[showTooltipFromEvent, tooltipContent]
)
Expand Down

0 comments on commit 7666935

Please sign in to comment.