mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
b43e695da2
Added logger using es6 syntax
49 lines
1.2 KiB
HTML
49 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
|
|
<link rel="stylesheet" href="../../dist/mermaid.css"/>
|
|
<script src="../../dist/mermaid.js"></script>
|
|
<style>
|
|
body{
|
|
background-color: #89896f;
|
|
}
|
|
|
|
</style>
|
|
<script>
|
|
|
|
function callback(id){
|
|
alert(id);
|
|
}
|
|
function callback2(id){
|
|
alert('x'+id);
|
|
}
|
|
mermaid.initialize({logLevel:1});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<h1>Links to callbacks</h1>
|
|
A has a tooltip and a callback <br/>
|
|
B has a link and a tooltip <br/>
|
|
C has a long tooltip <br/>
|
|
<div class="mermaid" id="i211">
|
|
graph LR;
|
|
A-->B;
|
|
B-->C;
|
|
click A callback "Tooltip"
|
|
click B "http://www.github.com" "This is a link"
|
|
click C callback "Tooltip quite long tooltip. So long that several rows are required... Not just two rows..."
|
|
</div>
|
|
|
|
<h1>Links to urls</h1>
|
|
A second diagram that should have its own callback on A even though the node has the same id.
|
|
<div class="mermaid" id="i213">
|
|
graph LR;
|
|
A-->B
|
|
B-->C
|
|
click A callback2 "Tooltip3"
|
|
</div>
|
|
</body>
|
|
</html>
|