#128

Edge to enclosing subgraph is hard to understand

Openhenrikjernevadintersoliaopened 27d ago

When an edge targets at a subgraph that encloses the source node, Pele 1.13.0 routes it to the center point of the subgraph rectangle. So the arrow may end up behind a node or in blank space between nodes.

Here are a few examples which I find hard to understand. I don't have a particular suggested solution, though I guess Mermaid's "point to subgraph border" is one sensible solution.

Note that all of these examples have the same problems if the edge is reversed, going from subgraph to enclosed node.

No edge visible

flowchart TD
  subgraph Subgraph
    Node
    Node --> Subgraph
  end

Pele's rendering does not show the edge at all.

Edge ends in empty space

flowchart TD
  subgraph Subgraph
    Node1
    Node2
    Node1 --> Subgraph
  end

While the edge is visible, I did not interpret it as an edge pointing to the subgraph but as a broken edge or rendering issue.

Edge ends behind node

flowchart TD
  subgraph Subgraph
    Node1
    Node2
    Node3
    Node1 --> Subgraph
  end

This makes it look like an arrow-less edge between two nodes.

Edge to parent's parent

flowchart TD
  subgraph Subgraph1
    subgraph Subgraph2
    Node1
    Node2
    Node1 --> Subgraph1
    end 
  end

Even if I know that an edge to a subgraph is represented as pointing towards the middle of the subgraph, it is not clear which subgraph if multiple subgraphs are nested. To be fair, Mermaid does not even seem to render this example.

Activity

0

No activity yet.