Sequence diagram: "alt" overlaps "box"

0 votes
asked Sep 20, 2017 in Bug by xachin (120 points)

plantuml.1.2017.16

The following code generates a diagram in which "alt" overlaps both boxes. The boxes should have shown through "alt".

@startuml
 
box "Box 1"
    participant "Participant 1" as p1
    participant "Participant 2" as p2
end box
box "Box 2"
    participant "Participant 3" as p3
end box
 
p1->p2: Message1
    alt Condition 1
        p2->p3: Message 2
    else Condition 2
        p2->p2: Message 3
    end
 
@enduml

1 Answer

0 votes
answered Jan 26, 2018 by Anthony-Gaudino (5,720 points)

You can do it individually:

@startuml
box "Box 1"
    participant "Participant 1" as p1
    participant "Participant 2" as p2
end box
box "Box 2"
    participant "Participant 3" as p3
end box

p1->p2: Message1
    alt #transparent Condition 1
        p2->p3: Message 2
    else Condition 2
        p2->p2: Message 3
    end
@enduml

or use skinparam SequenceGroupBodyBackgroundColor transparent and skinparam SequenceReferenceBackgroundColor transparent to set it globally.

commented Apr 6, 2021 by anonymous
Perfect! Thanks for that.
...