C4-PlantUML
C4-PlantUML copied to clipboard
Add support for lineThickness in AddRelTag
New attempt at https://github.com/plantuml-stdlib/C4-PlantUML/pull/218
Hi @fredde-fisk,
thank you for the new skinparam based implementation.
Your solution uses the skinparam arrow Thickness xxx
(instead of styles). I checked your implementation and it works basically like below (only that it is documented)
I have only 2 questions:
a) Is Thickness
a new skinparam (means do we need a version check and do we have to ignore it in older PlantUML versions)?
b) Can you add $lineThickness
as last argument of AddRelTag()... and other calls? It would avoid order/meaning changes in the arguments (if a call uses arguments without keywords)
Thank you and best regards Helmut
@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
' , $lineThickness=3)
AddRelTag("tag1", $lineStyle=DashedLine())
skinparam arrow<<tag1>> {
Thickness 3
}
' , $lineThickness=8
AddRelTag("tag2", $lineColor="#800000", $lineStyle=DottedLine())
skinparam arrow<<tag2>> {
Thickness 8
}
Container(a, "A")
Container(b, "B")
Container(c, "C")
Rel(a, b, " ", $tags="tag1")
Rel(b, c, " ", $tags="tag2")
Rel(a, c, " ")
@enduml
I checked the last non working sample too (and it is working with current version, I didn't check it with an older version)
@startuml
skinparam arrow {
Color red
FontColor green
FontSize 15
}
skinparam arrow<<tag1>> {
FontColor blue
Thickness 6
}
skinparam arrow<<tag2>> {
Color #blue;line.dotted
}
skinparam arrow<<tag3>> {
FontColor gray
}
[A] -> [B] : hello
[A2] -> [B2] <<tag2>> : hello
[A12] -> [B12] <<tag1>><<tag2>> : hello
[A1] -> [B1] <<tag1>> : hello
[A13] -> [B13] <<tag1>><<tag3>> : hello
[A31] -> [B31] <<tag3>><<tag1>> : hello
@enduml
Hi @fredde-fisk, during my #232 preparation I found a problem if no color is used in combination with $lineThickness. I reused your branch and fixed it directly in a new PR #254 (and added a new TestRelationsTags.puml). I hope it is ok for you. BR Helmut