package d2sequence
Import Path
github.com/pancsta/d2/d2layouts/d2sequence (on go.dev)
Dependency Relation
imports 16 packages, and imported by 3 packages
Package-Level Functions (total 3)
IsLifelineEnd reports whether obj is a synthetic sequence-diagram lifeline
endpoint.
Layout runs the sequence diagram layout engine on objects of shape sequence_diagram
1. Run layout on sequence diagrams
2. Set the resulting dimensions to the main graph shape
LifelineEndID returns the synthetic endpoint ID for an actor's lifeline.
The hash is formatted as an unsigned 32-bit value so the ID is stable across
architectures.
Package-Level Constants (total 21)
const EDGE_GROUP_LABEL_PADDING = 20 const GROUP_CONTAINER_PADDING = 12 const GROUP_Z_INDEX = 3
units of space on the left/right when computing the space required between actors
const LABEL_HORIZONTAL_PAD = 60
pad when the actor has the label placed OutsideMiddleBottom so that the lifeline is not so close to the text
const LIFELINE_STROKE_DASH int = 6 const LIFELINE_STROKE_WIDTH int = 2 const LIFELINE_Z_INDEX = 1 const MESSAGE_Z_INDEX = 4 const MIN_ACTOR_DISTANCE = 150 const MIN_ACTOR_WIDTH = 100
min vertical distance between messages
when a span has a single messages
const NOTE_Z_INDEX = 5 const SELF_MESSAGE_HORIZONTAL_TRAVEL = 80
default size
as the spans start getting nested, their size grows
const SPAN_MESSAGE_PAD = 10 const SPAN_Z_INDEX = 2
units of space on the top/bottom when computing the space required between messages
TODO lower
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |