Skip to content
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

Problem wit click event callback #174

Closed
gameshirtz opened this issue Jun 11, 2015 · 3 comments
Closed

Problem wit click event callback #174

gameshirtz opened this issue Jun 11, 2015 · 3 comments

Comments

@gameshirtz
Copy link

Hi,

thanks for the super cool mermaid.
I have a questions, because i have problems to set a click event to a Node.

Graph Code:

        graph LR
        ABC(Datasource) -- Input --> B((System))
        B -- Output --> C(Datasink)

        click ABC testc

JS Code:

  function testc(id){
    window.location.href = 'http://www.google.de';
  }

The callback function testc is not triggerd. What i have to to to get a click Event on the ABC node, so it will open the google website? Thank you!

@knsv
Copy link
Collaborator

knsv commented Jun 14, 2015

I could replicate the issue with a page that contains several diagrams and found a root cause the issue which I fixed. A side effect will be that on a page with several diagrams if the node ids are not unique a click could be mapped to several nodes.

knsv added a commit that referenced this issue Jun 14, 2015
@gameshirtz
Copy link
Author

Thank you, i will test it.

@knsv
Copy link
Collaborator

knsv commented Jun 21, 2015

Fixed with release 0.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants