I found out recently that plantuml sorts of align all the classes of the same rank. Each class is then centered around an invisible line corresponding to that rank
Example:
Here Class 1, Class2, Class3 and Class4 have the same rank and get centered around an invisible line for that rank.
On a simple diagram like this one, it's not so much an issue but it gets a bit awkward in more complex diagrams
Example:
@startuml
skinparam linetype ortho
namespace namespace1 {
class ParentClass{
something
something
something
something
something
something
something
something
something
something
something
something
something
something
something
something
something
}
ParentClass -- Class1
ParentClass -- Class2
ParentClass -- Class3
ParentClass -- Class4
class Class1{
something
something
something
something
something
somethins
something
something
something
something
something
something
something
something
something
something
something
something
something
something
something
something
something
}
class Class2{
something
something
something
something
something
something
something
}
class Class3{
something
something
something
something
}
class Class4{
something
something
}
}
namespace namespace2 {
OtherParentClass -- Class1
OtherParentClass -- Class2
class Class1{
something
}
class Class2{
something
}
}
@enduml
In namespace2 in this example, the children classes are really far from the parent class.
Is there a way to control this better? Ideally I would like to be able to center all the classes of the same rank toward the top or even be able to reset the position of the invisible ranking line (so that in namespace2 the position of Class1, Class2 is independent of the positioning of the classes in namespace1)