diff --git a/src/core/renderer.typ b/src/core/renderer.typ index 8081885..4f604d8 100644 --- a/src/core/renderer.typ +++ b/src/core/renderer.typ @@ -353,6 +353,24 @@ ) },) +#let render-debug() = get-ctx(ctx => { + for p in ctx.participants.filter(p => p.invisible) { + let color = if p.name.starts-with("?") {green} else if p.name.ends-with("?") {red} else {blue} + let x = ctx.x-pos.at(p.i) + draw.line( + (x, 0), + (x, ctx.y), + stroke: (paint: color, dash: "dotted") + ) + draw.content( + (x, 0), + p.display-name, + anchor: "west", + angle: 90deg + ) + } +}) + #let render(participants, elements) = context canvas(length: 1pt, { setup-ctx(participants, elements) @@ -379,24 +397,9 @@ return ctx }) - // Draw vertical lines + lifelines + end participants draw.on-layer(-1, { if DEBUG-INVISIBLE { - for p in participants.filter(p => p.invisible) { - let color = if p.name.starts-with("?") {green} else if p.name.ends-with("?") {red} else {blue} - let x = x-pos.at(p.i) - draw.line( - (x, 0), - (x, y), - stroke: (paint: color, dash: "dotted") - ) - draw.content( - (x, 0), - p.display-name, - anchor: "west", - angle: 90deg - ) - } + render-debug() } participant.render-lifelines()