Stability of nodes and edges levels
See original GitHub issueDescribe the Bug
A node can be displayed at the max z-index
level when selected, but when it is deselected, its level will be reset to the initial level (which is defined by the render order I think). Therefore, a user cannot rearrange the level order of the nodes. This behavior is a little unconventional and may cause some problems in applications.
Your Example Website or App
https://reactflow.dev/docs/examples/overview/
Steps to Reproduce the Bug or Issue
- Drag one of the upper nodes over some of the lower nodes. The upper node will cover the lower ones.
- Click the blanket to deselect the upper node.
- The upper node is covered by the lower ones.
Expected behavior
The levels of the nodes shouldn’t be affected by deselection.
Screenshots or Videos
Platform
- OS: [Windows]
- Browser: [Edge]
- Version: [v10]
Additional context
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:8 (4 by maintainers)
Top Results From Across the Web
A framework for stability‐based module detection in ... - NCBI
Our approach to estimating module stability has several objectives: to identify a threshold for defining a correlation graph that gives rise to stable...
Read more >Stability of Dynamical Systems on a Graph
We investigate two notions of stability; the first is connective stability, where the overall system is stable in the sense of Lyapunov despite...
Read more >Stability notions in synthetic graph generation
Figure 1: Node-level changes between instances. In graph instances G1 and G2, node Angela is a “leader” with rel- atively high in-degree. In...
Read more >Stability of graph communities across time scales
The optimality of this partition follows from the fact that clustering vertices i and j together induce a variation in [5] given by...
Read more >Stability of network centrality measures: a numerical study
The first perturbation method relies on the changing edge weights on fixed node and edge sets of graphs representing real-life processes. S&P ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for your thoughts on the updated zIndex logic. We have designed the default behavior of the nodes and edges in React Flow v10 like this:
This behavior can be customized:
defaultEdgeOptions={{ zIndex: 0 }}
I agree that this seems to be too complicated, if you want to have the v9 behavior out of the box. Maybe we can add a property that allows to control this behavior, but for now I think the easiest way is to use
defaultEdgeOptions={{ zIndex: 0 }}
.I personally don’t like it if you’re using edge labels, because you can drag a node such that the label of its edge completely occludes another node label beneath it.
Github seems to be having some issues, as I can’t currently upload a screenshot.You can replicate in the Overview Example by dragging “This is a default node” such that the edge label occludes “Node id: 5”.This also causes issues with custom nodes that have “badges” attached to them, e.g. some architecture styles have visual elements that extend beyond the border of the base node (see below). In this case, the edge will show above the badges on the left, which isn’t functionally breaking anything, but is not visually pleasing.
However, I get the rationale from a grouping perspective, so it’s tricky. I would expect that if I had Group Node A with children Nodes B and C, and an Edge E between B-C, that the z-index of E would be higher than A. Maybe it could be a togglable option? I understand that the use case I described above is a probably a little niche, so I’d be happy to manually set the z-index in my case.
Edit: Added pictures now that Github Issues is stable again.