-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Trying to add link using 'click' to flowchart #188
Comments
Sorry to hear that. Will take a look. |
I see the issue. With the render method you get the svg code back. The bindings done during rendering is void as the whole svg is torned out from the DOM and returned. |
Hi Knut- So does this mean that using the render API call will not allow a link (via javascript)? |
It turns out that it is not hard to fix this so the callback for the render function not only get the svg code back but also a function that sets up the bindings. It would look something like this:
Will commit this in a bit. Not released yet though so if you need this early you need to the latest build. |
Hmm.. |
bindEvents is a function that binds the click events as per the graph definition. This must be done after the svg code is in the DOM. If you get undefined instead of a function it means that you not have the lastest mermaid. |
Something went wrong... Did a rebuild. Have this code working:
|
Hi Knut- Looks like some browser differences are entering the picture. Thank you for your timely replies |
I did not catch you mention of mermaid version earlier. I just ran thru the source that I have here. It is marked 0.5.1. Perhaps there is a newer version? |
Tested in Firefox and noticed the problem was again with the css rules. Change the initalization call to:
Then it works in firefox as well! |
Thank you so much for your help! |
This is like dot syntax. In dot you can add "URL" (and "tooltip") to a node. Is URL here not possible? I need each node with a URL. Click on node should open a new page. ;) |
Yes I'll add that. Good what of breaking up a large flowchart top smaller pieces. How should the syntax for the tooltip look? |
Will continue discussions about click/tooltip in add this in issue #34. Will close this issue, let me know any objections. |
…yarn/develop/autoprefixer-10.2.6 Bump autoprefixer from 10.2.5 to 10.2.6
I have tried everything that I can think of to get a click event to fire on a flowchart item, per the docs and the test case code, but I cannot figure out what I am doing wrong. I am using mermaid 0.5.1. Here is my code:
The text was updated successfully, but these errors were encountered: