#1223 Adding support for multiple transitions to a node from another node

This commit is contained in:
Knut Sveidqvist
2020-01-29 19:57:59 +01:00
parent 0082c23a90
commit 4709195a1d
4 changed files with 45 additions and 25 deletions

View File

@@ -319,7 +319,7 @@ describe('State diagram', () => {
}
);
});
it('Simplest compone state', () => {
it('Simplest composit state', () => {
imgSnapshotTest(
`
stateDiagram
@@ -332,5 +332,17 @@ describe('State diagram', () => {
}
);
});
it('should handle multiple arrows from one node to another', () => {
imgSnapshotTest(
`
stateDiagram
a --> b: Status
a --> b: Stop
`,
{
logLevel: 0,
}
);
});
});

View File

@@ -18,20 +18,16 @@
<h1>info below</h1>
<div style="display: flex;width: 100%; height: 100%">
<div class="mermaid" style="width: 100%; height: 100%">
graph TB
A --> B
A ==> C
A .-> D
A === E
A -.- F
D -- Hello --> a
D-- text including R TD space --xb
stateDiagram
a --> b: Status
a --> b: Stop
</div>
</div>
<script src="./mermaid.js"></script>
<script>
mermaid.initialize({
theme: 'dark',
// theme: 'dark',
// arrowMarkerAbsolute: true,
// themeCSS: '.edgePath .path {stroke: red;} .arrowheadPath {fill: red;}',
logLevel: 0,