Skip to content

Untitled boolean in Mermaid Config Schema

txt
https://mermaid.js.org/schemas/config.schema.json#/properties/elk/properties/keepEntryNodeOnTop

Elk 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.

AbstractExtensibleStatusIdentifiableCustom PropertiesAdditional PropertiesAccess RestrictionsDefined In
Can be instantiatedNoUnknown statusUnknown identifiabilityForbiddenAllowednoneconfig.schema.json*

keepEntryNodeOnTop Type

boolean

keepEntryNodeOnTop Default Value

The default value is:

json
false
Opens in mermaid.ai