How to choose orientation of fork and join nodes in state diagrams

0 votes
asked Jan 14, 2014 in Wanted features by fred (540 points)

Hello,

 

Fork and join nodes can be defined in the following way:

state foo1 <<fork>>
state foo2 <<join>>

 

However, I could not find how to choose their orientation. All my fork and join nodes end up horizontal, which fits a vertical flow but not an horizontal one.

 

For instance, when changing ranking direction, it could be useful to also change fork and join nodes orientation:

@startuml

state f <<fork>>
A -> f
f -> B
@enduml
 
and
 
@startuml
left to right direction
state f <<fork>>
A --> f
f --> B
@enduml

produce roughly the same diagram (except for arc length), with an horizontal fork, which does not look good.

 

Thanks,

Fred

1 Answer

0 votes
answered Jan 14, 2014 by plantuml (295,000 points)
selected Jan 15, 2014 by fred
 
Best answer

This has been fixed in the following beta
https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

@startuml
left to right direction
state f <<fork>>
A --> f
f --> B
@enduml


Thanks for your tests.
Please go on!

commented Jan 15, 2014 by fred (540 points)
Works as expected. Thanks.


Remark: There may be cases in which one may want horizontal fork (or join) nodes with an horizontal flow, or vertical nodes with a vertical flow. In such cases it would be necessary to have a way to specify node orientation individually. However the general case is now handled satisfactorily.
...