Skip to content

Rel_Left/Right/Up/Down are not followed when using LAYOUT_LEFT_RIGHT. #174

Closed
@oliv3r

Description

@oliv3r

With a simple graph like
LAYOUT_UP_DOWN

@startuml

!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml

System(sysA, "System A", "System A")
System(sysB, "System B", "System B")

System_Boundary(sysbA, "System Boundary A") {
   Container(conA, "Container A", "Container A")
   Container(conB, "Container B", "Container B")

   Rel_Right(conA, conB, "Rel right")
}

Rel_Left(sysA, sysB, "Rel left")
Rel_Right(sysA, sysB, "Rel right")

@enduml

The behavior changes significantly (left becomes up) when using LAYOUT_LEFT_RIGHT.
LAYOUT_LEFT_RIGHT

@startuml

!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml

LAYOUT_LEFT_RIGHT()

System(sysA, "System A", "System A")
System(sysB, "System B", "System B")

System_Boundary(sysbA, "System Boundary A") {
   Container(conA, "Container A", "Container A")
   Container(conB, "Container B", "Container B")

   Rel_Right(conA, conB, "Rel right")
}

Rel_Left(sysA, sysB, "Rel left")
Rel_Right(sysA, sysB, "Rel right")

@enduml

And so to get the design right, one has to quirkingly use Up/Down to mean Left/Right.
LEFT_is_UP

@startuml

!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml

LAYOUT_LEFT_RIGHT()

System(sysA, "System A", "System A")
System(sysB, "System B", "System B")

System_Boundary(sysbA, "System Boundary A") {
   Container(conA, "Container A", "Container A")
   Container(conB, "Container B", "Container B")

   Rel_Up(conA, conB, "Rel right")
}

Rel_Down(sysA, sysB, "Rel left")
Rel_Up(sysA, sysB, "Rel right")

@enduml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions