Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Layout hints

drumlin normally places everything for you. Hints adjust the result and keep the model readable. They describe relations, never coordinates. Hints work in component, package and state diagrams. Sequence and activity diagrams take their order from the file.

HintEffect
a left-of b, a right-of bHorizontal order
a above b, a below bVertical order
align a b cPlaces elements in the same rank

Same rank

Connectors normally give each element its own rank. align overrides that and places elements in one rank, which shortens a wide diagram.

diagram component "Without align"
component Gateway
component Auth
component Orders
Gateway --> Auth
Auth --> Orders
Without align Gateway Auth Orders
diagram component "With align"
component Gateway
component Auth
component Orders
Gateway --> Auth
Auth --> Orders
align Auth Orders
With align Gateway Auth Orders

Forcing order

With direction right, above and below order elements within a rank.

diagram component "Metrics above Logs"
component App
component Logs
component Metrics
App --> Logs
App --> Metrics
Metrics above Logs
Metrics above Logs App Logs Metrics

Along the diagram direction, a hint forces a rank order even with no connector.

diagram component "Order without connectors"
component Boot
component Init
component Run
Boot left-of Init
Init left-of Run
Order without connectors Boot Init Run

Hints across containers

A hint between elements in different containers applies to the containers that hold them.

package "Ingest" { component Reader }
package "Serve" { component Query }
package "Admin" { component Console }
Reader left-of Query
Console left-of Query
Ingest Reader Serve Query Admin Console