5

Can we apply different Align Directions in Blocks? (as the title said)

For example in a State Diagram:

Both State_1 and State_2 have two internal states State_1.x and State_2.y (x = 1..2, y = 1..2)

@startuml

[*] -->  State_1
State_1 --> State_2

state State_1 {
    left to right direction
    [*] --> State_1.1
    [*] --> State_1.2
}

state State_2 {
    top to bottom direction
    [*] --> State_2.1
    [*] --> State_2.2
}

@enduml

I have tried the code above, it doesn't work. Can we restrict the affect-region of the command 'top to bottom direction'?

I have also tried the following code.

@startuml

[*] -->  State_1
State_1 --> State_2

state State_1 {
    /‘not good..'/
    [*] -> State_1.1
    [*] -> State_1.2
    [*] -> State_1.3

    /‘not good either'/
    [*] -right-> State_1.1
    [*] -right-> State_1.2
    [*] -right-> State_1.3
}

state State_2 {
    [*] --> State_2.1
    [*] --> State_2.2
}

@enduml

PS, can any UML Modelling Software edit .eps and .svg files?

Thanks in advance!

gundamlh
  • 183
  • 1
  • 9
  • The layout algorithm is seemingly nondeterministic at times, probably because of the complexity of the dot graph that is made. Sometimes I play with left to right setting AND the -left-> etc options. Changing the order of when blocks are defined can also yield different results. In the end, you spend as much time tweaking the source as you would pushing rectangles around in Visio. Perfect is the enemy of good. – Fuhrmanator Jul 05 '15 at 14:41

0 Answers0