mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-22 16:59:48 +02:00
Fix for issue #259
This commit is contained in:
8
dist/mermaidAPI.slim.js
vendored
8
dist/mermaidAPI.slim.js
vendored
@@ -29798,7 +29798,8 @@ var config = {
|
|||||||
return d.getMonth();
|
return d.getMonth();
|
||||||
}]]
|
}]]
|
||||||
},
|
},
|
||||||
classDiagram: {}
|
classDiagram: {},
|
||||||
|
info: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
Logger.setLogLevel(config.logLevel);
|
Logger.setLogLevel(config.logLevel);
|
||||||
@@ -30023,7 +30024,7 @@ var render = function render(id, txt, cb, container) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.render = function (id, text, cb, containerElement) {
|
exports.render = function (id, text, cb, containerElement) {
|
||||||
log.info('APA');
|
try {
|
||||||
if (arguments.length === 1) {
|
if (arguments.length === 1) {
|
||||||
text = id;
|
text = id;
|
||||||
id = 'mermaidId0';
|
id = 'mermaidId0';
|
||||||
@@ -30035,6 +30036,9 @@ exports.render = function (id, text, cb, containerElement) {
|
|||||||
// In browser
|
// In browser
|
||||||
return render(id, text, cb, containerElement);
|
return render(id, text, cb, containerElement);
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
log.warn(e);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var setConf = function setConf(cnf) {
|
var setConf = function setConf(cnf) {
|
||||||
|
@@ -232,7 +232,8 @@ var config = {
|
|||||||
}]
|
}]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
classDiagram:{}
|
classDiagram:{},
|
||||||
|
info:{}
|
||||||
};
|
};
|
||||||
|
|
||||||
Logger.setLogLevel(config.logLevel);
|
Logger.setLogLevel(config.logLevel);
|
||||||
@@ -475,7 +476,7 @@ var render = function(id, txt, cb, container){
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.render = function (id, text, cb, containerElement) {
|
exports.render = function (id, text, cb, containerElement) {
|
||||||
log.info('APA');
|
try{
|
||||||
if(arguments.length === 1){
|
if(arguments.length === 1){
|
||||||
text = id;
|
text = id;
|
||||||
id = 'mermaidId0';
|
id = 'mermaidId0';
|
||||||
@@ -488,6 +489,10 @@ exports.render = function (id, text, cb, containerElement) {
|
|||||||
// In browser
|
// In browser
|
||||||
return render(id, text, cb, containerElement);
|
return render(id, text, cb, containerElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}catch(e){
|
||||||
|
log.warn(e);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -19,6 +19,9 @@ graph LR;
|
|||||||
A-->B;
|
A-->B;
|
||||||
B-->C;
|
B-->C;
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mermaid">
|
||||||
|
info
|
||||||
|
</div>
|
||||||
<div class="mermaid">
|
<div class="mermaid">
|
||||||
sequenceDiagram
|
sequenceDiagram
|
||||||
Merchant->>Customer: foo
|
Merchant->>Customer: foo
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="stylesheet" href="../dist/mermaid.forest.css"/>
|
<link rel="stylesheet" href="../dist/mermaid.forest.css"/>
|
||||||
<script src="../dist/mermaid.min.js"></script>
|
<script src="../dist/mermaid.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var config = {
|
var config = {
|
||||||
startOnLoad:true,
|
startOnLoad:true,
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
click A coolAction
|
click A coolAction
|
||||||
B --> D{Rhombus}
|
B --> D{Rhombus}
|
||||||
C --> D
|
C --> D
|
||||||
A("test(vcc) a a ") --> B;
|
A("test(vcc) a a ") --> B
|
||||||
snda
|
snda
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -156,8 +156,9 @@
|
|||||||
c1-->a2
|
c1-->a2
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mermaid" >graph TB
|
<div class="mermaid">
|
||||||
subgraph
|
graph TB
|
||||||
|
subgraph Tjo
|
||||||
sq[Square shape] -.-> ci((Circle shape))
|
sq[Square shape] -.-> ci((Circle shape))
|
||||||
od>Odd shape]-. Two line<br>edge comment .-> ro
|
od>Odd shape]-. Two line<br>edge comment .-> ro
|
||||||
di{Diamond with <br/> line break} ==> ro(Rounded<br>square<br>shape)
|
di{Diamond with <br/> line break} ==> ro(Rounded<br>square<br>shape)
|
||||||
@@ -183,12 +184,11 @@
|
|||||||
sq[Square shape]-->ci((Circle shape))
|
sq[Square shape]-->ci((Circle shape))
|
||||||
od>Odd shape]---|Two line<br>edge comment|ro
|
od>Odd shape]---|Two line<br>edge comment|ro
|
||||||
end
|
end
|
||||||
subgraph
|
subgraph dfdg
|
||||||
od2>Really long text in an Odd shape]-->od3>Really long text with linebreak<br>in an Odd shape]
|
od2>Really long text in an Odd shape]-->od3>Really long text with linebreak<br>in an Odd shape]
|
||||||
di{Diamond is broken}-->ro(Rounded squar shape);
|
di{Diamond is broken}-->ro(Rounded squar shape)
|
||||||
di-->ro2(Rounded square shape)
|
di-->ro2(Rounded square shape)
|
||||||
end
|
end
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mermaid">
|
<div class="mermaid">
|
||||||
graph LR;
|
graph LR;
|
||||||
@@ -201,30 +201,13 @@
|
|||||||
C-->|XYZ Router|D;
|
C-->|XYZ Router|D;
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h1>Sequence diagrams (experimental)</h1>
|
<h1>Sequence diagrams </h1>
|
||||||
<pre>
|
<div class="mermaid">
|
||||||
sequenceDiagram
|
|
||||||
participant John the Long
|
|
||||||
Alice->Bob: Hello Bob, how are you?
|
|
||||||
Note left of Bob: Bob thinks
|
|
||||||
Bob-->Alice: I am good thanks!
|
|
||||||
Bob-->John the Long: How about you John?
|
|
||||||
Note left of John the Long: Bob thinks
|
|
||||||
Bob-->Alice: Checking with John...
|
|
||||||
|
|
||||||
loop Multiple status checks
|
|
||||||
loog Naging
|
|
||||||
Alice->John the Long: Yes... John, how are you?
|
|
||||||
end
|
|
||||||
John the Long-->Alice: Better then you!
|
|
||||||
end
|
|
||||||
</pre>
|
|
||||||
<div class="mermaid2">
|
|
||||||
sequenceDiagram
|
sequenceDiagram
|
||||||
participant Alice
|
participant Alice
|
||||||
Note left of Alice: Bob thinks about <br/> things <br/> to think about
|
Note left of Alice: Bob thinks about <br/> things <br/> to think about
|
||||||
</div>
|
</div>
|
||||||
<div class="mermaid2">
|
<div class="mermaid">
|
||||||
sequenceDiagram
|
sequenceDiagram
|
||||||
participant Alice
|
participant Alice
|
||||||
participant Bob
|
participant Bob
|
||||||
|
Reference in New Issue
Block a user