Text over lifeline

+1 vote
asked Mar 14, 2022 in Question / help by jack2022 (140 points)

When i align the sequence message to center and have a message over lifelines, the lifeline is still visible under the message. But when i add a note it hides the lifeline. How can i get the same behavior with message over lifeline?

@startuml
autonumber
skinparam SequenceMessageAlign center
participant "one" as one
participant "two" as two
participant "three" as three
one -> three: sample te
rnote over one, three
Hello
endrnote
@enduml

1 Answer

+1 vote
answered Mar 14, 2022 by The-Lu (89,080 points)
selected Mar 14, 2022 by jack2022
 
Best answer

Hello J.,

A possible workaround, is to use creole `<back:white>`, as:

CodeOutput
Without
@startuml
scale 3
hide footbox
autonumber
skinparam SequenceMessageAlign center
participant "one" as one
participant "two" as two
participant "three" as three
one -> three: sample te
rnote over one, three
Hello
endrnote
@enduml
With
@startuml
scale 3
hide footbox
autonumber
skinparam SequenceMessageAlign center
participant "one" as one
participant "two" as two
participant "three" as three
one -> three: <back:white>sample te
rnote over one, three
Hello
endrnote
@enduml

See doc. here:

Regards,
Th.

commented Mar 20, 2022 by jack2022 (140 points)

I found a better way of doing this. Just adding this worked for me.

skinparam SequenceMessage {
    BackgroundColor #white
}
...