in the following example:
http://www.plantuml.com/plantuml/uml/jP0z2iCm38NtTuhinOJ-T3M17g4dK1oP1cm5R6Ke8NUlquP2mMkN9_WqwDFhibBIEGRuH96RKPIJ9ySBNA2Sc_YyRNC1sjPDCR9eni7FudISv5Z7fpe-r_6bZgzOyPMuHmhXO_9FaHNO7swCiJztjntsbaWcVN1QGCRsw8rr9OmTC9JaTtgiw5Y6KkqB
Note that there are 2 "features" present with the layout engine.
- layout is generated from the "inside out"
- frames are built after the dot layout and simply bound the boxes
The first item is that the layout engine is fed the "smallest" items. In this case, all of the class objects are fed to the layout engine and graphed accordingly. This results in each class being placed on a rank with others of the same rank, that is, centered on the same line. So if one object is much bigger than another, the the smaller one will be stretched until it reaches the center alignment of all others of the same rank. We can see that with `class d` and `mySmallClass`. They have the same rank, so they are placed on the same horizontal line. This results in an unsightly stretching of the graph on the left. Notice that the space between abc and d is greater than the space between d and ef.
The second item is that the frame surrounding our objects is created after the layout engine has completed. and is just a box that surround each object plus some buffer space. The buffer space is constant and the frame has no impact on the layout of the class objects. With the layout of class objects being centered on rank, and the frame being a constant offset from the largest box in that group; we can see that there are cases in which the frames are also offset from each other. notice how "another" is much lower that "interface". This again, results in an unsightly layout.
I think that each frame having the ability to encapsulate it's own layout, would help in "cleaning" up an image. That is, the frame "another" would send all of its classes to the layout engine, thus resulting in a nice, compact layout meant only for it. Then the "interface" frame would send it's components to the layout engine, and result in it's own compact layout. Then the frames can be aligned with each other however the user wants (top align, left align, etc).
Is any of this even possible at the moment? Or am I just looking at some XY problem?