mirror of
https://github.com/plantuml-stdlib/C4-PlantUML.git
synced 2022-10-18 01:14:54 +00:00
Merge pull request #212 from kirchsth/feature/211_rel_properties
#211 AddProperty for relationships
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
'Version
|
||||
' ##################################
|
||||
!function C4Version()
|
||||
!return "2.4.0"
|
||||
!return "2.5.0beta1"
|
||||
!end function
|
||||
|
||||
!procedure C4VersionDetails()
|
||||
@@ -1017,6 +1017,11 @@ rectangle "$getBoundary($label, $type)" $toStereos("boundary", $tags) as $alias
|
||||
' line break is not deterministic, calculate it
|
||||
!$rel = $rel + '\n\n' + $breakDescr($descr, $REL_DESCR_MAX_CHAR_WIDTH)
|
||||
!endif
|
||||
!$prop = $getProps()
|
||||
!if ($prop != "")
|
||||
' reuse table
|
||||
!$rel = $rel + $prop
|
||||
!endif
|
||||
!return $rel
|
||||
!endfunction
|
||||
|
||||
|
||||
@@ -580,7 +580,7 @@ SHOW_LEGEND()
|
||||
|
||||

|
||||
|
||||
## Element properties
|
||||
## Element and Relation properties
|
||||
|
||||
A model can be extended with (a table of) properties that concrete deployments or more detailed concepts can be documented:
|
||||
|
||||
@@ -616,11 +616,15 @@ Deployment_Node_L(nodeAlias, "Label", "Optional Type", "Optional Description (wi
|
||||
|
||||
System(systemAlias, "Label", "Optional Description (without properties)")
|
||||
|
||||
Rel(personAlias, containerAlias, "Label", "Optional Technology")
|
||||
' starting with v.2.5.0 relations support properties too
|
||||
WithoutPropertyHeader()
|
||||
AddProperty("PropC1", "ValueC1")
|
||||
AddProperty("PropC2", "ValueC2")
|
||||
Rel(personAlias, containerAlias, "Label", "Optional Technology", "Optional Description")
|
||||
@enduml
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
## Version information
|
||||
|
||||
|
||||
Reference in New Issue
Block a user