-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Add syntax for double headed arrows #123
Comments
Switch the arrows around?
Although that might still cause problems, not sure would need to be explored and cross browser tested. Bit of a leap, but the duality of the plus-minus could be considered "two way",
That's easy on a mac keyboard (top left under esc), Win and Linux users would need to use key combos by default The third option is to simply render codependent entities as a single double-headed arrow,
As far as I can see the meaning is the same, but the visual is improved. |
Anyway, I'd like to see this feature too |
We should support this. I would happily add contributions in this area. The >--< option is intuitive in one way but odd in another way. My favorite, but strong opionions are appreviated. The third option is the obvious one and if nothing else, this has to work. Regardless of any shorter syntax agreed upon:
|
How should one force two separate arrows (i.e. the current behavior) when using two entries? This is sometimes needed for readability. |
I like either |
I like |
|
When at this one I would highly appreciate to be able to just reverse the direction of single headed arrow as well. Rationale: In a TD diag the arrangement on the screen heavily depends on entities left or right. And so I'm often in the conflict of having EITHER a good arrangement but then with logically wrong or no arrow heads OR the right arrow direction. Should I open a new one for this? Since I think it can be done within the work for this one... |
Would be appreciated if this can be implemented soon since it has been 3 years. |
I just wanted a line with on both sides an arrow, looks like it is not possible |
Use the unicode Char(LONG LEFT RIGHT ARROW): “⟷” to be more intuitive. |
@snowyu, the main argument against a unicode character is Mermaid's inspiration by Markdown. One of the main advantages is the ability for developers to easily type these files with a standard text editor. That becomes much more difficult if the characters used are not found on a standard keyboard. I still advocate for a syntax using normal ASCII characters. Possibly |
I have been using markdown too. You can Even in the terminal env, for instance, in the Vim text-editor you could enter insert mode and press I think this is not a conflict with the using ASCII characters. It could be supported both way. |
I agree. What's needed? |
Simple |
Read the very first comment. |
This one is implemented with the syntax <--> |
But it does not work? Any guidance? (Or is the live editor not updated) |
@knsv As of 8.2.6, double headed arrow is still not rendered. It is accepted by the processor though. This
|
@knsv thank you for the double arrow support. This is awesome! I've been able to confirm what @phuongnd08 is seeing with the mermaid live editor. It also looks like the live editor is using version, 8.2.6, as: |
@knsv, thanks for all the work you've provided for this lib. I just pulled master and built it from source and was unable to get the double arrows to render correctly. I see that there are specs (which pass) but when trying it in an editor the double arrow is ignored though no error occurs. Just and FYI. I am happy to help debug this further but since this is day one of me looking at the source i'm still trying to get my bearings. Please let me know where i can be of service. |
@phuongnd08 you can "hack" double headed arrows with classDiagram as this example: https://mermaid-js.github.io/mermaid/#/?id=class-diagram-experimental |
@heavysixer @yieme @phuongnd08 I could get the double arrow using the Just begin your graph definition with Example here in the live editor |
How does one have an arrow point to the left if it's at all possible? |
Why isn't this supported in Sequence diagrams on here? https://mermaid-js.github.io No arrows are rendered, it's just a line when using syntax like: |
Support for Sequence diagrams is needed for both side arrows. |
Can you point to where in the code the syntax for sequence diagrams is parsed? I think syntax with A->>B could be extended to A->*B for arrow in "all" (both) directions. |
Any Solution for the both sided arrow in sequence diagrams? |
Please add both side arrows in sequence diagrams. Thanks. |
For anyone looking at this in the future, the bidirectional arrows were added today in #5209. |
This can make diagrams less cluttered.
The obvious syntax: <--> wont work is it will be interpreted as an odd tag by the browser.
Maybe:
Am open for suggestions and better ideas.
The text was updated successfully, but these errors were encountered: