mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
72.62k stars 6.62k forks source link

No effect of click event:can not open link #571

Closed a761208 closed 6 years ago

a761208 commented 7 years ago
graph LR
456ac9b0d15a8b7f1e71073221059886[1051 AAA fa:fa-check]
f7f580e11d00a75814d2ded41fe8e8fe[1141 BBB fa:fa-check]
81dc9bdb52d04dc20036dbd8313ed055[1234 CCC fa:fa-check]
456ac9b0d15a8b7f1e71073221059886 -->|Node| f7f580e11d00a75814d2ded41fe8e8fe
f7f580e11d00a75814d2ded41fe8e8fe -->|Node| 81dc9bdb52d04dc20036dbd8313ed055
click 456ac9b0d15a8b7f1e71073221059886 "/admin/user/view?id=1051" "AAA<br />6000"
click f7f580e11d00a75814d2ded41fe8e8fe "/admin/user/view?id=1141" "BBB<br />600"
click 81dc9bdb52d04dc20036dbd8313ed055 "/admin/user/view?id=1234" "CCC<br />3000"
style 456ac9b0d15a8b7f1e71073221059886 fill:#f9f,stroke:#333,stroke-width:4px
tylerlong commented 6 years ago

https://mermaidjs.github.io/mermaid-live-editor/#/edit/ICAgICAgZ3JhcGggTFIKYTQ1NmFjOWIwZDE1YThiN2YxZTcxMDczMjIxMDU5ODg2WzEwNTEgQUFBIGZhOmZhLWNoZWNrXQpmN2Y1ODBlMTFkMDBhNzU4MTRkMmRlZDQxZmU4ZThmZVsxMTQxIEJCQiBmYTpmYS1jaGVja10KYTgxZGM5YmRiNTJkMDRkYzIwMDM2ZGJkODMxM2VkMDU1WzEyMzQgQ0NDIGZhOmZhLWNoZWNrXQphNDU2YWM5YjBkMTVhOGI3ZjFlNzEwNzMyMjEwNTk4ODYgLS0-fE5vZGV8IGY3ZjU4MGUxMWQwMGE3NTgxNGQyZGVkNDFmZThlOGZlCmY3ZjU4MGUxMWQwMGE3NTgxNGQyZGVkNDFmZThlOGZlIC0tPnxOb2RlfCBhODFkYzliZGI1MmQwNGRjMjAwMzZkYmQ4MzEzZWQwNTUKY2xpY2sgYTQ1NmFjOWIwZDE1YThiN2YxZTcxMDczMjIxMDU5ODg2ICIvYWRtaW4vdXNlci92aWV3P2lkPTEwNTEiICJBQUEKNjAwMCIKY2xpY2sgZjdmNTgwZTExZDAwYTc1ODE0ZDJkZWQ0MWZlOGU4ZmUgIi9hZG1pbi91c2VyL3ZpZXc_aWQ9MTE0MSIgIkJCQgo2MDAiCmNsaWNrIGE4MWRjOWJkYjUyZDA0ZGMyMDAzNmRiZDgzMTNlZDA1NSAiL2FkbWluL3VzZXIvdmlldz9pZD0xMjM0IiAiQ0NDCjMwMDAiCnN0eWxlIGE0NTZhYzliMGQxNWE4YjdmMWU3MTA3MzIyMTA1OTg4NiBmaWxsOiNmOWYsc3Ryb2tlOiMzMzMsc3Ryb2tlLXdpZHRoOjRweA

It seems that There is a bug, that the id after click should not start with a number.

I changed 456ac9b0d15a8b7f1e71073221059886 to a456ac9b0d15a8b7f1e71073221059886 and 81dc9bdb52d04dc20036dbd8313ed055 to a81dc9bdb52d04dc20036dbd8313ed055 and it works

tylerlong commented 6 years ago

Root cause: https://github.com/d3/d3/issues/1858

tylerlong commented 6 years ago

Fixed: https://mermaidjs.github.io/mermaid-live-editor/#/edit/Z3JhcGggTFIKNDU2YWM5YjBkMTVhOGI3ZjFlNzEwNzMyMjEwNTk4ODZbMTA1MSBBQUEgZmE6ZmEtY2hlY2tdCmY3ZjU4MGUxMWQwMGE3NTgxNGQyZGVkNDFmZThlOGZlWzExNDEgQkJCIGZhOmZhLWNoZWNrXQo4MWRjOWJkYjUyZDA0ZGMyMDAzNmRiZDgzMTNlZDA1NVsxMjM0IENDQyBmYTpmYS1jaGVja10KNDU2YWM5YjBkMTVhOGI3ZjFlNzEwNzMyMjEwNTk4ODYgLS0-fE5vZGV8IGY3ZjU4MGUxMWQwMGE3NTgxNGQyZGVkNDFmZThlOGZlCmY3ZjU4MGUxMWQwMGE3NTgxNGQyZGVkNDFmZThlOGZlIC0tPnxOb2RlfCA4MWRjOWJkYjUyZDA0ZGMyMDAzNmRiZDgzMTNlZDA1NQpjbGljayA0NTZhYzliMGQxNWE4YjdmMWU3MTA3MzIyMTA1OTg4NiAiL2FkbWluL3VzZXIvdmlldz9pZD0xMDUxIiAiQUFBPGJyIC8-NjAwMCIKY2xpY2sgZjdmNTgwZTExZDAwYTc1ODE0ZDJkZWQ0MWZlOGU4ZmUgIi9hZG1pbi91c2VyL3ZpZXc_aWQ9MTE0MSIgIkJCQjxiciAvPjYwMCIKY2xpY2sgODFkYzliZGI1MmQwNGRjMjAwMzZkYmQ4MzEzZWQwNTUgIi9hZG1pbi91c2VyL3ZpZXc_aWQ9MTIzNCIgIkNDQzxiciAvPjMwMDAiCnN0eWxlIDQ1NmFjOWIwZDE1YThiN2YxZTcxMDczMjIxMDU5ODg2IGZpbGw6I2Y5ZixzdHJva2U6IzMzMyxzdHJva2Utd2lkdGg6NHB4