-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angled arrows #129
Comments
Would forward and back slashes work?
Not very pretty, but the simplest I could think of just now. |
Thanks for the quick reply. That is actually an interesting proposal - though extending it to the other 3 arrow types ( An alternative might be to keep the existing arrows but allow annotations specifying how many lines to 'drop' (where a 'drop' of 0 would be a horizontal line). This would also fairly naturally support diagrams like the first one at https://w3.cs.jmu.edu/bernstdh/Web/CS460/study-aids/exam2-sample.php:
This could be made more readable by allowing to set a 'default drop' at the top of the file, and set that to '1' if you're drawing these kinds of diagrams. |
Ah, looks like the attributes are added at the end of the line in #74. So representing https://w3.cs.jmu.edu/bernstdh/Web/CS460/study-aids/exam2-sample.php as:
|
@raboof I know it's been several years, but if you're still interested in this feature I've just added a version of it to my editor (https://github.com/davidje13/SequenceDiagram), and I'd be keen to hear your feedback on whether it fulfils your needs. It's a little rough-around-the-edges, but should be functional. I think the syntax is quite natural, so I'd suggest it for this project too:
So your example could be drawn with:
As you can see from the example, the downside of this syntax is that lines won't align automatically. You have to put some thought into which actions must be simultaneous to make the final diagram regular (same slants and spacing). |
Thanks for the ping, that looks quite cool! Indeed a bit 'goto-ish' but that is probably hard to avoid - my I hadn't found a satisfying way of drawing such diagrams yet, you I'll be sure to make a note for when the need arises again! |
Someone over at mermaid js pointed out the behavior in sequencediagram.org - mermaid-js/mermaid#450 (comment) I think this is quite a minimal and intuitive syntax.
|
It'd be really great to have support for angled (and even crossing!) arrows, to represent messages being sent e.g. over a network.
Example: http://tex.stackexchange.com/questions/99436/network-message-sequence-diagram
I fully realize this would be nontrivial to add: finding a good way to represent such diagrams in text is a challenge on its own. It'd probably be wise to consider this a 'other diagram' (I don't seem to be able to add milestones to issues though). Hopefully much of the rendering and styling code can be generalized/re-used, though.
Inspiration for the textual representation could be:
Though none of those are particularly appealing.
search terms: diagonal, slanted
The text was updated successfully, but these errors were encountered: