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

0 votes
asked Feb 14, 2020 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, 2020 by The-Lu (63,920 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.

commented Jun 15, 2023 by anonymous
There's no difference shown between the graphics. Poor example.
commented Jun 16, 2023 by The-Lu (63,920 points)
It seems there are some regressions... or some old errors...
...