affu
affu

Reputation: 161

How to define on-click events for nodes using flowchart.js

Does flowchart.js supports on-click event handlers? Can any one help me to define event handlers for nodes using flowchart.js

Upvotes: 5

Views: 936

Answers (1)

Lars
Lars

Reputation: 510

You can add a javascript function to node clicks. Take the following definition:

op1=>operation: My Operation:>javascript:dostuff(5)

When clicked, this will call the function dostuff with the parameter 5.

I don't think this behavior is documented, but it mirrors that of anchors in HTML, where the same thing is possible:

<a href="javascript:dostuff(5)">Do Stuff</a>

Upvotes: 4

Related Questions