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

Support horizontal line #228

Open jkopczyn opened 4 years ago

jkopczyn commented 4 years ago

Use case where this came up: I have a process which has mainly synchronous tasks but some asynchronous ones which outlive the parent task. I would like a large, clear marker of where the parent task ends. This could also be done by making the vertical line for that task end higher on the page, but I believe that would be harder to specify cleanly, less clear, and less broadly applicable.

Suggested syntax:

note across page: [optional message]

Or in terms of the grammar:

note_statement
  ...
  | 'note' 'across_page' message    { <???> }
  ;

I'm not sure what the easiest way to implement this on the drawing side is, nor am I opinionated on it; it could be a line with ARRROWTYPE.NONE but given that the line also wouldn't inherently be from or to any actor I'm not sure sharing code there makes sense.