lifelines

This commit is contained in:
Júlio César Batista 2022-12-02 13:59:12 -08:00
parent 641850cf5e
commit 6b467095ae
No known key found for this signature in database
GPG key ID: 10C4B861BF314878
2 changed files with 6 additions and 3 deletions

View file

@ -19,3 +19,7 @@ const SPAN_DEPTH_GROWTH_FACTOR = 8.
// when a span has a single messages
const MIN_SPAN_HEIGHT = 80.
const LIFELINE_STROKE_WIDTH int = 2
const LIFELINE_STROKE_DASH int = 8

View file

@ -134,9 +134,8 @@ func (sd *sequenceDiagram) addLifelineEdges() {
sd.lifelines = append(sd.lifelines, &d2graph.Edge{
Attributes: d2graph.Attributes{
Style: d2graph.Style{
StrokeDash: &d2graph.Scalar{Value: "10"},
Stroke: actor.Attributes.Style.Stroke,
StrokeWidth: actor.Attributes.Style.StrokeWidth,
StrokeDash: &d2graph.Scalar{Value: fmt.Sprintf("%d", LIFELINE_STROKE_DASH)},
StrokeWidth: &d2graph.Scalar{Value: fmt.Sprintf("%d", LIFELINE_STROKE_WIDTH)},
},
},
Src: actor,