bramp / js-sequence-diagrams

Draws simple SVG sequence diagrams from textual representation of the diagram
https://bramp.github.io/js-sequence-diagrams/
BSD 2-Clause "Simplified" License
7.8k stars 1.08k forks source link

How to specify which item is on which side #190

Closed owenhu99 closed 6 years ago

owenhu99 commented 6 years ago

For example, I would like Sender to be on the left and Receiver to be on the right. However, because my first line is Receiver->Sender: Sends Public Key, the entire diagram will have Receiver on the left and Sender on the right. How can I resolve this?

bramp commented 6 years ago

Use the participant keyword to force the order, for example

participant Sender
Receiver->Sender: Sends Public Key

As Sender is now mentioned first, it is displayed first on the diagram.

owenhu99 commented 6 years ago

Thank you! @bramp