Search code examples
umlplantumltool-uml

PlantUML object layout control is not working, how to deal with that?


@startuml
rectangle "System Architecture" as map {
    rectangle "Problem" as problem {
        rectangle "Quantity" as quantity {

        }

    }
    rectangle "Soluation" as solution {
        rectangle "Flow 1" as flow_1 {

        }
        rectangle "Flow 2" as flow_2 {

        }
        flow_1 -down[hidden]-> flow_2
        rectangle "Flow 3" as flow_3 {

        }
        flow_2 -down[hidden]-> flow_3
        rectangle "Flow ..." as flow_ {

        }
        flow_3 -down[hidden]-> flow_
        rectangle "Flow N" as flow_n {

        }
        flow_ -down[hidden]-> flow_n

    }
    problem -right[hidden]- flow_3
}


@enduml

I want problem laying left of solution, so I think problem -right-> solution can make it, but it turns out neither -left- nor -right- can make any change, problem lays right anyway, what should I do?

SO tells me there mostly code out there, so here I am forced to make some bullshit, I think layout control of PlantUML is horrible, no one knows what is the result during development, OK, here it is


Solution

  • When I defined the rectangles in the other order and adjusted the arrow between problem and flow_3 it looks OK to me.

    @startuml
    rectangle "System Architecture" as map {
    
        rectangle "Soluation" as solution {
            rectangle "Flow 1" as flow_1 {
    
            }
            rectangle "Flow 2" as flow_2 {
    
            }
            flow_1 -down[hidden]-> flow_2
            rectangle "Flow 3" as flow_3 {
    
            }
            flow_2 -down[hidden]-> flow_3
            rectangle "Flow ..." as flow_ {
    
            }
            flow_3 -down[hidden]-> flow_
            rectangle "Flow N" as flow_n {
    
            }
            flow_ -down[hidden]-> flow_n
    
        }
        rectangle "Problem" as problem {
            rectangle "Quantity" as quantity {
    
            }
    
        }
        problem -[hidden]> flow_3
    }
    @enduml
    
    

    Result in the plantuml web service: http://www.plantuml.com/plantuml/uml/VP71JWCX48RlFCMazzsaoztKYqUZyMYCmOAM18OAGvh6xBkBYCkQmCvfXdp_nmGEWOIdQ0tpwaW2Fuo2tTCraB9mwuydJUauUhK34S2ACtmn1gdMj3DHa7QOcP2cdo61K6h5tXbtWNq6trFxka_OmitTn5GJKpjHR8Dq5tm-QIaLlWmt9TBrykhb6zwfxULTxpYErRmXvcrnrtjVhRYXRLkHiSgkp0_UlHbbi_hysxS_xp4A94tNJ7wMuVyQzOP5DVpjiRpQp0uAPRJc6m00

    Maybe a source of some ideas: