Reputation: 161
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
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