forked from HEL/chronos
refactored participant rendering
This commit is contained in:
@ -155,7 +155,7 @@
|
||||
let m2 = participant.get-size(p2)
|
||||
let w1 = m1.width
|
||||
let w2 = m2.width
|
||||
widths.push(w1 / 2pt + w2 / 2pt + PAR-SPACE)
|
||||
widths.push(w1 / 2 + w2 / 2 + PAR-SPACE)
|
||||
}
|
||||
return widths
|
||||
}
|
||||
@ -326,6 +326,12 @@
|
||||
#let setup-ctx(participants, elements) = (ctx => {
|
||||
let state = ctx.at("shared-state", default: (:))
|
||||
|
||||
let (elements, participants) = participant.pre-resolve-styles(
|
||||
extract-ctx(ctx, with-style: true),
|
||||
elements,
|
||||
participants
|
||||
)
|
||||
|
||||
let chronos-ctx = (
|
||||
participants: init-lifelines(participants),
|
||||
pars-i: get-participants-i(participants),
|
||||
@ -382,7 +388,8 @@
|
||||
// Draw participants (start)
|
||||
get-ctx(ctx => {
|
||||
for p in ctx.participants {
|
||||
if p.from-start and not p.invisible and p.show-top {
|
||||
let style = p.resolved-style
|
||||
if style.from-start and not p.invisible and style.show-top {
|
||||
(p.draw)(p)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user