added support for auto color with _note and _par
This commit is contained in:
parent
3bc103b9d7
commit
b66634d44f
@ -25,6 +25,9 @@
|
|||||||
panic("Aligned notes can only be over a participant (got side '" + side + "')")
|
panic("Aligned notes can only be over a participant (got side '" + side + "')")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if color == auto {
|
||||||
|
color = COL-NOTE
|
||||||
|
}
|
||||||
return ((
|
return ((
|
||||||
type: "note",
|
type: "note",
|
||||||
side: side,
|
side: side,
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
"queue",
|
"queue",
|
||||||
"custom"
|
"custom"
|
||||||
)
|
)
|
||||||
|
#let DEFAULT-COLOR = rgb("#E2E2F0")
|
||||||
|
|
||||||
#let _par(
|
#let _par(
|
||||||
name,
|
name,
|
||||||
@ -20,11 +21,14 @@
|
|||||||
from-start: true,
|
from-start: true,
|
||||||
invisible: false,
|
invisible: false,
|
||||||
shape: "participant",
|
shape: "participant",
|
||||||
color: rgb("#E2E2F0"),
|
color: DEFAULT-COLOR,
|
||||||
custom-image: none,
|
custom-image: none,
|
||||||
show-bottom: true,
|
show-bottom: true,
|
||||||
show-top: true,
|
show-top: true,
|
||||||
) = {
|
) = {
|
||||||
|
if color == auto {
|
||||||
|
color = DEFAULT-COLOR
|
||||||
|
}
|
||||||
return ((
|
return ((
|
||||||
type: "par",
|
type: "par",
|
||||||
name: name,
|
name: name,
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
#import "note.typ"
|
#import "note.typ"
|
||||||
|
|
||||||
#let get-arrow-marks(sym, color) = {
|
#let get-arrow-marks(sym, color) = {
|
||||||
|
if sym == none {
|
||||||
|
return none
|
||||||
|
}
|
||||||
if type(sym) == array {
|
if type(sym) == array {
|
||||||
return sym.map(s => get-arrow-marks(s, color))
|
return sym.map(s => get-arrow-marks(s, color))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user