3 Commits

Author SHA1 Message Date
e4f919b50d fix: begin of life arrow
Some checks failed
CI / tests (pull_request) Failing after 24s
2026-06-28 02:20:22 +02:00
48458b054d feat: make _ret end-tip configurable 2026-06-28 02:20:22 +02:00
e45144c0e8 fix: do not stroke arrow heads 2026-06-28 02:19:54 +02:00
3 changed files with 13 additions and 11 deletions

View File

@@ -13,12 +13,12 @@
}
(
"": none,
">": (symbol: ">", fill: color),
">>": (symbol: "straight"),
"\\": (symbol: ">", fill: color, harpoon: true),
"\\\\": (symbol: "straight", harpoon: true),
"/": (symbol: ">", fill: color, harpoon: true, flip: true),
"//": (symbol: "straight", harpoon: true, flip: true),
">": (symbol: ">", fill: color, stroke: (dash: "solid")),
">>": (symbol: "straight", stroke: (dash: "solid")),
"\\": (symbol: ">", fill: color, harpoon: true, stroke: (dash: "solid")),
"\\\\": (symbol: "straight", harpoon: true, stroke: (dash: "solid")),
"/": (symbol: ">", fill: color, harpoon: true, flip: true, stroke: (dash: "solid")),
"//": (symbol: "straight", harpoon: true, flip: true, stroke: (dash: "solid")),
"x": none,
"o": none,
).at(sym)
@@ -130,8 +130,8 @@
let par = ctx.participants.at(i2)
let m = measure(box(par.display-name))
let f = if i1 > i2 {-1} else {1}
end-info.x -= (m.width + PAR-PAD.last() * 2) / 2pt * f
(par.draw)(par, y: end-info.y)
end-info.x -= (m.width / 2 / 1pt - 1.5) * f
(par.draw)(par, y: end-info.y - m.height / 1pt)
}
end-info.ll-lvl = ctx.lifelines.at(i2).level * LIFELINE-W / 2

View File

@@ -57,7 +57,8 @@
seq.p2, seq.p1,
comment: ret.comment,
disable-src: true,
dashed: true
dashed: true,
end-tip: ret.end-tip,
).first()
return (elmts, activation-history)
}

View File

@@ -45,9 +45,10 @@
),)
}
#let _ret(comment: none) = {
#let _ret(comment: none, end-tip: ">") = {
return ((
type: "ret",
comment: comment
comment: comment,
end-tip: end-tip
),)
}