How to Position Hover Div Relative to a Movable Node in React Flow? #4843
Unanswered
shubham-smartfoodsafe
asked this question in
Q&A
Replies: 1 comment
-
I can't access your CodeSandBox, but you can make it easily with custom Node. In my case, I'm using Tailwind, and it works normally:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working with React Flow and I'm using the onNodeMouseEnter and onNodeMouseLeave events to show a div with additional information when a particular node is hovered.
The problem I’m encountering is that when I hover over a node, the div appears, but it doesn't position relative to the hovered node. Since the node is movable, the hover div stays in a static position and doesn't move with the node.
I’ve tried implementing this, and here’s a CodeSandbox : https://codesandbox.io/p/live/7d64285b-ab06-4ca0-ad57-3e4999cfc691
How can I ensure the div remains positioned relative to the node, even as the node moves around?
explorer_OrMf2HiMMJ.mp4
Beta Was this translation helpful? Give feedback.
All reactions