mermaid.sequence.layout.frame

mermaid.sequence.layout

frame(script, metrics) -> frame

Lay a sequence diagram's script out into a frame

script is what mermaid.sequence.parser.parse returns. metrics holds, in cells, pad, the blank columns each side of a participant's name, gap, the least blank between two participants' boxes, and text_wrap and note_wrap, the columns a message's text and a note's text wrap at.

The frame holds:

ElementDrawn as
a participanta box of style actor, round for an actor, with texts of style actor.label
a lifelineroutes of style lifeline, from the box down, broken where a note lies over them
a messagea route of style edge between two lifelines on one row, and knockout texts of style message.label on the rows above it
a message to oneselfa route that loops off the lifeline's right, with its text beside it
an activationa box of shape bar and style activation on the lifeline
a notea box of style note with texts of style note.label
a blocka group of style group, its tag and text on the top side, and a dotted divider for each else, and or option

A rect block draws no group. A numbered script puts each message's number before its text.