Activity beta: default arrow direction with one-branch if

+1 vote
asked Jul 28, 2016 in Wanted features by ivokrab (190 points)


With the new activity diagram syntax, the default direction of the 'if' and 'else' branches are left and right, respectively. As a consequence, diagrams tend to 'expand to the left' a lot.

A request for customizable directions exists, and would be very nice if it could be implemented in any case, but is so far not answered.

IMHO diagrams would already become more readable if the default direction would become 'down' instead for the 'if'-branch when there is no 'else' or the 'else' is empty (i.e. only present to put a label on the 'else'-branch, but no operations in it) or with only a 'stop'. Alternatively, if the 'if'-branch is empty or contains only a 'stop' (as in some branches of the example given by where the reversal is clearly used to improve the layout also) and the 'else'-branch is not, the 'else'-branch should go down instead.

This behaviour (the first part of it) is already default if there is an 'elseif' following the 'if', and for each 'elseif' as well, so should maybe not be too complicated to implement?

However, I understand that this is a matter of taste, so maybe the default behaviour should be configurable with a 'skinparam' option for the diagram?

2 Answers

0 votes
answered Jul 28, 2016 by plantuml (131,770 points)
Ok, we like the idea.

We will implement a 'down' direction when 'then' or 'else' is either empty/only stop
This sound like a fair default behaviour.
If people complains about it, we will then introduce a new skinparam option to go back to the current implementation.

We need some time to do this, and we will post a message here when a beta will be ready.
So please be patient :-)

And thanks again for the suggestion!
0 votes
answered Sep 1, 2016 by plantuml (131,770 points)
Work is still in progress.
But you can find here a first beta version:

Do not hesitate to make feedback!
commented Nov 3, 2016 by ivokrab (190 points)
Finally got around to test the beta locally. Indeed 8048beta1 that I managed to download a while ago implements this behaviour nicely. However, in 8049beta19 which you made available for seem to have reverted to the old behaviour?
commented Nov 3, 2016 by plantuml (131,770 points)
Yes, it was reverted because in some cases, it causes drawing artifacts.
(Sorry that we did not mention that)

Example of issue:
if (dummy) then (foo)

However, we have just put it back again in last beta (8049beta20):

We are trying to properly finish this modification so that it will present in next official release.