mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-16 18:54:12 +01:00
add quick test for clickable flow chart node with tooltip
This commit is contained in:
15
dist/index.html
vendored
15
dist/index.html
vendored
@@ -14,6 +14,8 @@ B --> C{Let me think}
|
|||||||
C -->|One| D[Laptop]
|
C -->|One| D[Laptop]
|
||||||
C -->|Two| E[iPhone]
|
C -->|Two| E[iPhone]
|
||||||
C -->|Three| F[Car]
|
C -->|Three| F[Car]
|
||||||
|
click A "index.html#link-clicked" "link test"
|
||||||
|
click B testClick "click test"
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
@@ -101,5 +103,18 @@ Class08 <--> C2: Cool label
|
|||||||
<script>
|
<script>
|
||||||
mermaid.initialize({startOnLoad: true, theme: 'forest'});
|
mermaid.initialize({startOnLoad: true, theme: 'forest'});
|
||||||
</script>
|
</script>
|
||||||
|
<script>
|
||||||
|
function testClick(nodeId) {
|
||||||
|
console.log("clicked", nodeId);
|
||||||
|
var originalBgColor = document.querySelector('body').style.backgroundColor;
|
||||||
|
document.querySelector('body').style.backgroundColor = 'yellow';
|
||||||
|
setTimeout(function() {
|
||||||
|
document.querySelector('body').style.backgroundColor = originalBgColor;
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user