exposed lifeline-style in _evt
All checks were successful
CI / tests (push) Successful in 26s

fixes #22
This commit is contained in:
2026-01-21 13:48:03 +01:00
parent 771bfdc0ea
commit 53adb58525
5 changed files with 39 additions and 3 deletions

View File

@@ -1,7 +1,8 @@
/// Manually adds an event to the given participant /// Manually adds an event to the given participant
/// - participant (str): The participant concerned by the event /// - participant (str): The participant concerned by the event
/// - event (str): The event type (see @@EVENTS for ccepted values) /// - event (str): The event type (see @@EVENTS for ccepted values)
#let _evt(participant, event) = {} /// - lifeline-style (auto, dict): See @@_seq()
#let _evt(participant, event, lifeline-style: auto) = {}
/// Creates a sequence / message between two participants /// Creates a sequence / message between two participants
/// - p1 (str): Start participant /// - p1 (str): Start participant

Binary file not shown.

View File

@@ -42,13 +42,13 @@
),) ),)
} }
#let _evt(participant, event) = { #let _evt(participant, event, lifeline-style: auto) = {
return (( return ((
type: "evt", type: "evt",
draw: evt-render, draw: evt-render,
participant: participant, participant: participant,
event: event, event: event,
lifeline-style: auto lifeline-style: lifeline-style
),) ),)
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

@@ -38,3 +38,38 @@
_seq("c", "a") _seq("c", "a")
_evt("b", "destroy") _evt("b", "destroy")
}) })
#pagebreak()
#diagram({
_par("a", display-name: "Alice")
_par("b", display-name: "Bob")
_seq("a", "b")
_evt("b", "enable")
_seq("a", "b")
_evt("b", "enable", lifeline-style: (fill: red))
_gap()
_seq("b", "a")
_evt("b", "disable")
_seq("a", "b")
_evt("b", "enable", lifeline-style: (
stroke: (
paint: green,
dash: "dashed",
thickness: 2pt
)
))
_gap()
_seq("b", "a")
_evt("b", "disable")
_seq("b", "a")
_evt("b", "disable")
_seq("a", "b")
_evt("b", "enable", lifeline-style: (
radius: 4pt
))
_gap()
_seq("b", "a")
_evt("b", "disable")
})