plantuml / backlog

Contains all issues for plantuml that are not currently working-in-progress
0 stars 0 forks source link

Sub-component ordering issue #35

Open akerouanton opened 5 years ago

akerouanton commented 5 years ago

Hello,

First of all, thanks for your great project.

After several attemps, it looks like sub-component ordering is not working as expected.

In the following example, the subcomponent "middlewares" should come first and "storage" subcomponent should be at the right of "middlewares". Unfortunately, there's no way to get that, even with a hidden arrow (with right indication):

node "my\nsubprocess" {
    [stdout]
}

node "my process" {
    node "middlewares" as middlewares {
        [stdout] -right-> [some processing]
    }
    node "storage" as storage {
        [some processing] -right-> [storage writer]
    }
    middlewares -[hidden]right-> storage
}

@enduml

arnaudroques commented 5 years ago

Another option is to use the left to right direction

http://www.plantuml.com/plantuml/uml/NSnHoiCW3C3nTqyH-juhVFGUt_hWQjO5r8maKiRetIV53gbFHl_vJMfUhAJe8ZuCZ45eVHe44boCEBlC0M58xrlMSdy9BwWwmCT1FVzgWOlDRdU_3YvDUwSG8cvUi7vuXMvkNU_1EFxLWHEU6kLrFhAzGzLO_8e7sEuzTjrlQWit8KCvqTrDc4D9yGi0

Hope this help!

akerouanton commented 5 years ago

@arnaudroques Thanks, indeed it works properly with this directive. However, if I add bottom notes they are not placed correctly now. It's not a big deal, but still a bit surprising.

@startuml
left to right direction
node "my\nsubprocess" {
    [stdout]
}

node "my process" {
    node "middlewares" as middlewares {
        [stdout] --> [some processing]
    }
    node "storage" as storage {
        [some processing] --> [storage writer]
    }
}

note bottom of [some processing] : io.Writer
note bottom of [storage writer] : io.Writer
@enduml

gives me:

arnaudroques commented 5 years ago

Sounds like a bug. Top and bottom are inverted :-)

http://www.plantuml.com/plantuml/uml/RP113eCW44Ntd6BYtXx0HUCjkcXTe8oMH1WpZ35DuzrBa3R4b1N3V_ybJ1j4iwnkLZEE0aB0TdeA6CiuY2MlF1c4ohqUFgpzmZHW21My5SHp3s9ebKxjwiV1YSdlrfWPDyqO0nsWc3DN-g2kht4WXr-RzLENiBsG1Y7M4oPXlfUoSpzRCxYn5UGiFJuW248BqFYdswJ8qkMMUWVTamYvL3XfeSbXKMdHcxZf3m00

We'll have a look at it...