3 Commits

Author SHA1 Message Date
e4f919b50d fix: begin of life arrow 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, "": none,
">": (symbol: ">", fill: color), ">": (symbol: ">", fill: color, stroke: (dash: "solid")),
">>": (symbol: "straight"), ">>": (symbol: "straight", stroke: (dash: "solid")),
"\\": (symbol: ">", fill: color, harpoon: true), "\\": (symbol: ">", fill: color, harpoon: true, stroke: (dash: "solid")),
"\\\\": (symbol: "straight", harpoon: true), "\\\\": (symbol: "straight", harpoon: true, stroke: (dash: "solid")),
"/": (symbol: ">", fill: color, harpoon: true, flip: true), "/": (symbol: ">", fill: color, harpoon: true, flip: true, stroke: (dash: "solid")),
"//": (symbol: "straight", harpoon: true, flip: true), "//": (symbol: "straight", harpoon: true, flip: true, stroke: (dash: "solid")),
"x": none, "x": none,
"o": none, "o": none,
).at(sym) ).at(sym)
@@ -130,8 +130,8 @@
let par = ctx.participants.at(i2) let par = ctx.participants.at(i2)
let m = measure(box(par.display-name)) let m = measure(box(par.display-name))
let f = if i1 > i2 {-1} else {1} let f = if i1 > i2 {-1} else {1}
end-info.x -= (m.width + PAR-PAD.last() * 2) / 2pt * f end-info.x -= (m.width / 2 / 1pt - 1.5) * f
(par.draw)(par, y: end-info.y) (par.draw)(par, y: end-info.y - m.height / 1pt)
} }
end-info.ll-lvl = ctx.lifelines.at(i2).level * LIFELINE-W / 2 end-info.ll-lvl = ctx.lifelines.at(i2).level * LIFELINE-W / 2

View File

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

View File

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