Skip to content

Why are connections at the center of the node and not to the handle? #4917

Closed Answered by bcakmakoglu
surrealroad asked this question in Q&A
Discussion options

You must be logged in to vote

Basically what you're doing is delaying the rendering of the Handle, which causes the Edge to not know where the handle bounds are and instead just trying to use the center of the node as a fallback.

Without visible handles, edges cannot be rendered at the accurate positions - which is what you're producing by wrapping your component in an if for a transition.
If you need to do that, you'd have to call updateNodeInternals after the node has been rendered and is visible, but that would cause the edges to jump from center to the handle they are supposed to go.

TL;DR: The if isn't gonna work out the way you want it to imo.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@bcakmakoglu
Comment options

Answer selected by surrealroad
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants