Right-justify / Align Right for message text in sequence diagram?

0 votes
asked Feb 14 in Question / help by William Tell
I want to be able to have the message text for messages to be aligned according to the location of the actor / participant. So if I have Actor A and Actor B, and A is on the left and B is on the right, I'd like to be able to do:

A   ->  B: Left-justified text

A  <-  B: Right-justified text

It seems like the only justification I'm seeing is left justification for the text for all messages. Is it possible to control this?

1 Answer

0 votes
answered Oct 6 by The-Lu (8,880 points)

Hello W.,

As mentioned on:

For a possible workaround, you can use:

skinparam SequenceMessageAlign first

Without, all is Left-justified:

@startuml
A -> B: Left-justified\ntext\ntext
A <- B: Left-justified\ntext\ntext
@enduml


[See on PlantUML server]

With, we observe Left-justified and Right-justified:

@startuml
skinparam SequenceMessageAlign first
A -> B: Left-justified\ntext\ntext
A <- B: Right-justified\ntext\ntext
@enduml


[See on PlantUML server]

If that can help,
Regards,
Th.

...