Untitled boolean in Mermaid Config Schema
https://mermaid.js.org/schemas/config.schema.json#/properties/elk/properties/keepEntryNodeOnTopElk specific option that keeps the entry node of a recursive flow at the top of the layout.
When a flow loops back on itself (a back-edge to an earlier node), ELK's degree-based cycle-breaking has no notion of an "entry point" and may rank the first-declared node in the middle, scrambling the reading order. When enabled, the entry node of each cyclic component is pinned to the first layer so the diagram still reads from its entry. Acyclic flows always have a natural source, so this has no effect on them.
Only applies when the cyclic flow has no node without incoming edges: if the loop is fed from outside (e.g. a start node pointing into it), that component already has a natural source and nothing is pinned. Detection is also scoped per container, so cycles that cross a subgraph boundary are not detected.
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|---|---|---|---|---|---|---|---|
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | config.schema.json* |
keepEntryNodeOnTop Type
boolean
keepEntryNodeOnTop Default Value
The default value is:
false