added lifeline-style

This commit is contained in:
2024-06-18 23:00:41 +02:00
parent ed84e06560
commit 4dd940f584
4 changed files with 36 additions and 9 deletions

View File

@ -1,5 +1,5 @@
#import "@preview/cetz:0.2.2": canvas, draw
#import "utils.typ": get-participants-i
#import "utils.typ": get-participants-i, get-style
#import "group.typ"
#import "sequence.typ"
#import "separator.typ"
@ -209,10 +209,12 @@
// Draw lifeline rectangles (reverse for bottom to top)
for rect in rects.rev() {
let (cx, y0, y1) = rect
let (cx, y0, y1, style) = rect
let style = get-style("lifeline", style)
draw.rect(
(cx - LIFELINE-W / 2, y0),
(cx + LIFELINE-W / 2, y1)
(cx + LIFELINE-W / 2, y1),
..style
)
}