Open lianghuilin opened 5 years ago
only the node with 'editable: true' support click event, so make sure it, thx
Hi,
I have the same probleme even with my node having editable: true
.
I think it is linked to the security update on mermaid preventing clic action with securityLevel: strict
=> https://mermaidjs.github.io/#/README
If I switch back to a previous version of mermaid (like 8.0.0) it is working just fine.
Also for me is not working. The node is editable, but no event get fired any hint?
Fixed by adding the config option like this: merconf: { theme: "default", startOnLoad: false, securityLevel: 'loose' },
Add this to the template: <vue-mermaid :nodes="mermaid" type="graph LR" :config="merconf" v-on:nodeClick="editNodeMer">
Fixed by adding the config option like this: merconf: { theme: "default", startOnLoad: false, securityLevel: 'loose' },
Thank you, i fix it before with manually edit vue-mermaid.js. See you comment, andI try again with mermaid config, and see trouble in my syntax. Syntax was fixed and all working now. Few words to people with same problem. How to fix clicks on nodes.
Generate node object with "editable: true" property
initialize vue-mermaid with binded config defenition <vue-mermaid v-bind:nodes="data" type="graph TB" @nodeClick="editNode" v-bind:config="mermaid">
Define config in Data section in your template. Check your config defenition contains securityLevel: 'loose' string data: function() { return { mermaid : { theme: "default", startOnLoad: !1, securityLevel: 'loose' }}},
template code
javascript code