Skip to content

Commit 42644b7

Browse files
author
JeanMarc van Leerdam
committed
Add conditional defines to allow standalone usage of sequence diagram support file.
1 parent 71438c7 commit 42644b7

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

dist/plantuml-stdlib/stdlib/archimate/ArchimateSequenceDiagramSupport.puml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,18 @@
22
' Based on the work by Steven Mileham (see [1]), and included here with his permission.
33
' [1] - https://smileham.co.uk/2019/04/23/archimate-plantuml-sequence-diagram-joy/
44

5+
' Make sure these are defined even if this file is used standalone
6+
!global $ARCH_SHARP_CORNER ?= 1
7+
!global $ARCH_DIAGONAL_CORNER ?= 12
8+
!global $ARCH_ROUND_CORNER ?= 25
9+
510
hide stereotype
611
<style>
712
sequenceDiagram {
13+
participant {
14+
MinimumWidth 10
15+
HorizontalAlignment center
16+
}
817
RoundCorner $ARCH_SHARP_CORNER
918
.Motivation {
1019
LineColor %darken("#MOTIVATION",80)
@@ -43,10 +52,12 @@ hide stereotype
4352

4453
!procedure $element($layer,$type,$structure,$label,$name="")
4554
!if ($name=="")
46-
participant "<$archimate/$type>\r $label" as $label <<$layer>> <<$structure>>
55+
!$id = $label
4756
!else
48-
participant "<$archimate/$type>\r $label" as $name <<$layer>> <<$structure>>
57+
!$id = $name
4958
!endif
59+
' using spaces to fake right-alignment of the icon
60+
participant " <$archimate/$type>%n()$label" as $id <<$layer>> <<$structure>>
5061
!endprocedure
5162

5263
' Motivation

0 commit comments

Comments
 (0)