Edges overlapping over the nodes #2046
Replies: 4 comments 11 replies
|
Hey @smadapathi this is the expected default behaviour. When you select a node, the node and all connected edges get a higher z-index. If you don't like that you can pass |
|
I built an open-source package that solves this: avoid-nodes-edge (React Flow) and avoid-nodes-edge-svelte (Svelte Flow) Edges automatically route around nodes with clean orthogonal (90-degree) paths, never crossing through any node. Uses libavoid (C++ WASM) in a Web Worker. React Demo · Svelte Demo | npm (React) · npm (Svelte) | GitHub | Package source React Flow: Svelte Flow: Make sure to use "libavoid-js": "0.4.5" as a peer dependency. Works with React Flow v12+ and Svelte Flow (@xyflow/svelte). |
|
[like] Ray Wei reacted to your message:
…________________________________
From: Muhammad Awais Shah ***@***.***>
Sent: Saturday, March 7, 2026 4:00:36 AM
To: xyflow/xyflow ***@***.***>
Cc: Ray Wei ***@***.***>; Comment ***@***.***>
Subject: Re: [xyflow/xyflow] Edges overlapping over the nodes (Discussion #2046)
I built an open-source package that solves this: avoid-nodes-edge<https://www.npmjs.com/package/avoid-nodes-edge>
Edges automatically route around nodes with clean orthogonal (90-degree) paths, never crossing through any node. Uses libavoid (C++ WASM) in a Web Worker.
Live Demo<https://avoid-nodes-pro-example.vercel.app> | npm<https://www.npmjs.com/package/avoid-nodes-edge> | GitHub<https://github.com/awaisshah228/react-flow-avoid-nodes-routing> | Package source<https://github.com/awaisshah228/react-flow-avoid-nodes-routing/tree/turbo-package>
npm install avoid-nodes-edge libavoid-js
Works with React Flow v12+.
—
Reply to this email directly, view it on GitHub<#2046 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCBHAJAFUKN6A7X4Y4GBILT4PONGJAVCNFSM6AAAAACWKFETF2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMMBTGAYTMOA>.
You are receiving this because you commented.Message ID: ***@***.***>
|
|
I'm the creator of react-flow-smart-edge , a library that uses using A* pathfinding to route edges around other nodes, avoiding intersections. It has smart equivalents for every type of edge React Flow has. It's been updated to work with React Flow 12. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello Team,
Thanks for the this awesome library. I have given four edge points around a node(custom one). When I drag/drop an edge from bottom edge point of node to the bottom edge point of another node, edge is drawn on top of the node (refer the pic). Is there any better way to represent the edges in these cases without overlapping over the node?.

All reactions