refactored sequences, sync and gaps

This commit is contained in:
2025-07-14 16:30:25 +02:00
parent e27bb9a9eb
commit 3a1c274e83
10 changed files with 849 additions and 401 deletions

View File

@ -1,27 +1,10 @@
#import "sequence.typ"
#import "core/draw/sync.typ"
#let _sync(elmts) = {
return ((
type: "sync",
draw: sync.render,
elmts: elmts
),)
}
#let render(pars-i, x-pos, participants, elmt, y, lifelines) = {
let draw-seq = sequence.render.with(pars-i, x-pos, participants)
let shapes = ()
let end-y = y
for e in elmt.elmts {
let yi
let shps
(yi, lifelines, shps) = draw-seq(e, y, lifelines)
shapes += shps
end-y = calc.min(end-y, yi)
}
let r = (end-y, lifelines, shapes)
return r
}