Draw edge to nested node from other hierarchy level
See original GitHub issueI’m submitting a…
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[X] Feature request
[ ] Documentation issue or request
[] Other... Please describe:
Is there a way to draw edges to nested nodes as in the elk docs?
Current behavior
Providing the nested node as edge target does not work - the edge will not show.
Expected behavior
Would be best to just provide the id of the node and edges are automatically also drawn towards nested elements.
Example
nodes={[
{
id: '1',
text: '1'
},
{
id: '2',
text: '2'
},
{
id: '2.1',
text: '2.1',
parent: '2'
},
{
id: '3',
text: '3'
}
]}
edges={[
{
id: '1-2',
from: '1',
to: '2.1'
},
{
id: '2-3',
from: '2',
to: '3'
}
]}
What is the motivation / use case for changing the behavior?
I would like to display nested nodes within one node and nodes from the “outside” should directly impact these nested nodes. Therefore, I need to display a direct edge towards the nested nodes.
Since we provide a parents
(and no children
) property, maybe we should resolve this by using the id of the nested node directly. ELKs approach is to traverse by the parents until the child is reached like edge source -> outside.inside.n1
, but i think their approach is not feasible for us, no?
@amcdnl could you share some thoughts on this? If you think this is a good “first ticket”, i will try to implement it.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (11 by maintainers)
Top GitHub Comments
Created these issues: #31 #32
@amcdnl thank you so much! 🎉 I did not notice so far, that edges have a parent property as well.
So I will extract the other two problems into separate issues and create a storybook story for my example from above - then we can close this issue.