Frame layout

0 votes
asked Nov 5, 2019 in Question / help by alonbl (200 points)
Hello,

I am trying to draw a component diagram with many components and frames.

The frames are organized  horizontally, I would like to have control over vertical assignment.

I tried to use `together` and hidden arrows between the components, but nothing enables me to set the order and wrap the frames into multiple lines. The only solution I found is to create multiple pages, however, this is inconvinience.

I will appreciate any help to allow reorder, an example is bellow, please try to have frame "E" below frame "A" (vertical).

Thanks!
Alon

```

@startuml

frame "A" {
    package "AP1" {
        rectangle "AP11"
        rectangle "AP12"
        rectangle "AP13"
    }
    package "AP2" {
        rectangle "AP21"
        rectangle "AP22"
        rectangle "AP23"
    }
}
frame "B" {
    package "BP1" {
        rectangle "BP11"
        rectangle "BP12"
        rectangle "BP13"
    }
    package "BP2" {
        rectangle "BP21"
        rectangle "BP22"
        rectangle "BP23"
    }
}
frame "C" {
    package "CP1" {
        rectangle "CP11"
        rectangle "CP12"
        rectangle "CP13"
    }
    package "CP2" {
        rectangle "CP21"
        rectangle "CP22"
        rectangle "CP23"
    }
}
frame "D" {
    package "DP1" {
        rectangle "DP11"
        rectangle "DP12"
        rectangle "DP13"
    }
    package "DP2" {
        rectangle "DP21"
        rectangle "DP22"
        rectangle "DP23"
    }
}
frame "E" {
    package "EP1" {
        rectangle "EP11"
        rectangle "EP12"
        rectangle "EP13"
    }
    package "EP2" {
        rectangle "EP21"
        rectangle "EP22"
        rectangle "EP23"
    }
}
frame "F" {
    package "FP1" {
        rectangle "FP11"
        rectangle "FP12"
        rectangle "FP13"
    }
    package "FP2" {
        rectangle "FP21"
        rectangle "FP22"
        rectangle "FP23"
    }
}
frame "G" {
    package "GP1" {
        rectangle "GP11"
        rectangle "GP12"
        rectangle "GP13"
    }
    package "GP2" {
        rectangle "GP21"
        rectangle "GP22"
        rectangle "GP23"
    }
}
frame "H" {
    package "HP1" {
        rectangle "HP11"
        rectangle "HP12"
        rectangle "HP13"
    }
    package "HP2" {
        rectangle "HP21"
        rectangle "HP22"
        rectangle "HP23"
    }
}
@enduml

```
commented Nov 29, 2019 by alonbl (200 points)
Hi,

Anyone? Any idea? Workaround?

Thanks!

1 Answer

0 votes
answered May 23, 2020 by The-Lu (63,920 points)

Hello A.,

Here is your diagram source:

PlantUML diagram [Click to see on PlantUML online server]

I will appreciate any help to allow reorder, an example is bellow, please try to have frame "E" below frame "A" (vertical).

And, as you mentioned, if we "use `together` and hidden arrows between the components"; We can obtain a workaround:

  1. with together for all component after the frame "E"
  2.  and some hidden arrows:
AP21 -[hidden]> AP22
AP21 -[hidden]-> AP23
AP23 -[hidden]-> EP21
EP21 -[hidden]> EP22
EP21 -[hidden]-> EP23

PlantUML diagram
[Click to the image to see code on PlantUML online server]

If that can help,
Regards,
Th.

commented May 23, 2020 by alonbl (200 points)
Thanks!

I believe this is too complex for a simple layout ordering of multiple objects... is there any other method?

For example while package are out of view, wrap down?

Or... hidden-down directive?

Btw: this editor in locale Hebrew is right-to-left without an option to switch into left-to-right.
...