refactored notes rendering

This commit is contained in:
2025-07-28 21:07:57 +02:00
parent e8666d466b
commit 6385762696
7 changed files with 82 additions and 42 deletions

View File

@@ -18,10 +18,9 @@
side,
content,
pos: none,
color: COL-NOTE,
shape: "default",
aligned: false,
allow-overlap: true
allow-overlap: true,
..style
) = {
if side == "over" {
if pos == none {
@@ -33,19 +32,15 @@
panic("Aligned notes can only be over a participant (got side '" + side + "')")
}
}
if color == auto {
color = COL-NOTE
}
return ((
type: "note",
draw: note.render,
side: side,
content: content,
pos: pos,
color: color,
shape: shape,
aligned: aligned,
aligned-with: none,
allow-overlap: allow-overlap
allow-overlap: allow-overlap,
style: style.named()
),)
}