how to reduce the loop empty space after "test 3"

0 votes
asked Jul 10, 2020 in Question / help by PlutoNix (240 points)

@startuml
skinparam defaultTextAlignment center
skinparam shadowing false
skinparam backgroundColor transparent
skinparam ActivityBorderColor black
skinparam ActivityBorderThickness 2
skinparam ArrowColor black
skinparam ActivityDiamondBorderColor black
#BA7373:test1;
#92f7A3:test2;
#C0C3ED:loop
{{
skinparam shadowing false
skinparam backgroundColor transparent
skinparam ActivityBorderColor black
skinparam ActivityBorderThickness 2
skinparam ArrowColor black
#92f7A3:test3]
}}
;
#BA7373:test4;
@enduml

2 Answers

0 votes
answered Jul 10, 2020 by The-Lu (64,340 points)

Hello P.,

Currently IHMO there no workarround, this is due to the management of line breaks around the sub-diagram (around '{{' and '}}').

Here is another minimal test, in order to ask the wanted feature of suppress space around sub-diagram:

@startuml
start
:
{{
node node
}}
;
:test4;
@enduml


[Click to see on PlantUML server]

But in my minimal test, if we suppress line breaks, that also OK:

@startuml
start
:{{
node node
}};
:test4;
@enduml


[Click...]

But as soon as there are elements (like string 'loop') between ":" and "{{" that is KO, as:

@startuml
start
:loop{{
node node
}};
:test4;
@enduml


[Click...]

If that can help,
Regards,
Th.

0 votes
answered Jul 16, 2020 by Martin

Here is a workaround you might be able to make use of.   It turns out that if you can get the entire label on one line, then you can omit the carriage return between the }} and ;.  Strange...

http://www.plantuml.com/plantuml/png/VP31QiD034Jl_eg5_41h5qpZInodVv2ZUr2yihDuBGL9Rbf2_hqBkMmfxKKmp9iHp4uDnDOb5Ze7ke30uZoEi4OxugUrCKoq89aRqa79A3s3vskWoOqG5JFd1CCy2Q_aEuuipWH8avKQCgeTB7m4-zgpU9G7UOef-YTpF8TX9bHrPSw8yFN_-270mkH_VzhisxgggwsXsdDJR5xBiMuViaooU-ggjyCsCbzwkjrwoe7glQVxlVdHyT8KEoIVvlm6

@startuml
skinparam defaultTextAlignment center
skinparam shadowing false
skinparam backgroundColor transparent
skinparam ActivityBorderColor black
skinparam ActivityBorderThickness 2
skinparam ArrowColor black
skinparam ActivityDiamondBorderColor black
#BA7373:test1;
#92f7A3:test2;
#C0C3ED:loop\n{{\n#92f7A3:test3]\n}};
#BA7373:test4;
@enduml

Note: Your inner skinparams seemed redundant because they inherit automatically from the outer, so I omitted them.  But to show you could re-add them, here's a replacement line that changes the test3 border to grey:

#C0C3ED:loop\n{{\nskinparam ActivityBorderColor grey\n#92f7A3:test3]\n}};

...