fixes #22
This commit is contained in:
@@ -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
|
||||||
|
|||||||
BIN
manual.pdf
BIN
manual.pdf
Binary file not shown.
@@ -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
|
||||||
),)
|
),)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
tests/lifeline/event/ref/3.png
Normal file
BIN
tests/lifeline/event/ref/3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
@@ -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")
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user