mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-05 05:14:08 +01:00
#5237 Handling remaining references to useRough
This commit is contained in:
@@ -85,7 +85,7 @@ end
|
|||||||
Apa --> C
|
Apa --> C
|
||||||
</pre
|
</pre
|
||||||
>
|
>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
subgraph Apa["Apa"]
|
subgraph Apa["Apa"]
|
||||||
B["This is B"]
|
B["This is B"]
|
||||||
@@ -95,7 +95,7 @@ end
|
|||||||
Apa --> C
|
Apa --> C
|
||||||
</pre
|
</pre
|
||||||
>
|
>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid2">
|
||||||
flowchart RL
|
flowchart RL
|
||||||
subgraph Apa["Apa"]
|
subgraph Apa["Apa"]
|
||||||
subgraph Gorilla
|
subgraph Gorilla
|
||||||
@@ -107,7 +107,7 @@ end
|
|||||||
Gorilla --> C
|
Gorilla --> C
|
||||||
</pre
|
</pre
|
||||||
>
|
>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid2">
|
||||||
flowchart LR
|
flowchart LR
|
||||||
subgraph Apa["Apa"]
|
subgraph Apa["Apa"]
|
||||||
subgraph Gorilla
|
subgraph Gorilla
|
||||||
@@ -154,6 +154,32 @@ flowchart LR
|
|||||||
Apa --- C
|
Apa --- C
|
||||||
A --x C
|
A --x C
|
||||||
|
|
||||||
|
<pre id="diagram" class="mermaid2">
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
look: neo
|
||||||
|
theme: neo
|
||||||
|
layout: elk
|
||||||
|
elk.mergeEdges: true
|
||||||
|
themeVariables: {}
|
||||||
|
---
|
||||||
|
%% 'elk.stress',
|
||||||
|
%% 'elk.force'
|
||||||
|
%%'elk.mrtree'
|
||||||
|
%% 'elk.sporeOverlap
|
||||||
|
stateDiagram
|
||||||
|
direction TB
|
||||||
|
A --> B
|
||||||
|
A --> C
|
||||||
|
A --> D
|
||||||
|
A --> E
|
||||||
|
A --> F
|
||||||
|
state F {
|
||||||
|
Another
|
||||||
|
}
|
||||||
|
Another --> A
|
||||||
|
|
||||||
|
|
||||||
</pre
|
</pre
|
||||||
>
|
>
|
||||||
<pre id="diagram" class="mermaid2">
|
<pre id="diagram" class="mermaid2">
|
||||||
@@ -180,6 +206,12 @@ flowchart LR
|
|||||||
|
|
||||||
</pre
|
</pre
|
||||||
>
|
>
|
||||||
|
<pre id="diagram" class="mermaid2">
|
||||||
|
%%{init: {"layout": "elk", "mergeEdges": true} }%%
|
||||||
|
flowchart
|
||||||
|
A --> B(This is B)
|
||||||
|
</pre
|
||||||
|
>
|
||||||
<pre id="diagram" class="mermaid2">
|
<pre id="diagram" class="mermaid2">
|
||||||
%%{init: {"layout": "elk", "mergeEdges": false, "elk.nodePlacement.strategy": "SIMPLE"} }%%
|
%%{init: {"layout": "elk", "mergeEdges": false, "elk.nodePlacement.strategy": "SIMPLE"} }%%
|
||||||
stateDiagram
|
stateDiagram
|
||||||
@@ -200,7 +232,7 @@ flowchart LR
|
|||||||
if_state --> True : if n >= 0
|
if_state --> True : if n >= 0
|
||||||
</pre
|
</pre
|
||||||
>
|
>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid2">
|
||||||
%%{init: {"layout": "dagre", "mergeEdges": true} }%%
|
%%{init: {"layout": "dagre", "mergeEdges": true} }%%
|
||||||
stateDiagram
|
stateDiagram
|
||||||
direction TB
|
direction TB
|
||||||
@@ -221,7 +253,7 @@ State T1 {
|
|||||||
}
|
}
|
||||||
</pre
|
</pre
|
||||||
>
|
>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid2">
|
||||||
%%{init: {"layouts": "elk2", "mergeEdges": true} }%%
|
%%{init: {"layouts": "elk2", "mergeEdges": true} }%%
|
||||||
stateDiagram
|
stateDiagram
|
||||||
State S1 {
|
State S1 {
|
||||||
@@ -231,7 +263,7 @@ State T1 {
|
|||||||
S1 --> S2
|
S1 --> S2
|
||||||
</pre
|
</pre
|
||||||
>
|
>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid2">
|
||||||
%%{init: {"layout": "elk", "mergeEdges": true} }%%
|
%%{init: {"layout": "elk", "mergeEdges": true} }%%
|
||||||
stateDiagram
|
stateDiagram
|
||||||
State T1 {
|
State T1 {
|
||||||
@@ -241,7 +273,7 @@ State T1 {
|
|||||||
}
|
}
|
||||||
</pre
|
</pre
|
||||||
>
|
>
|
||||||
<pre id="diagram" class="mermaid">
|
<pre id="diagram" class="mermaid2">
|
||||||
%%{init: {"layout": "elk", "mergeEdges": true} }%%
|
%%{init: {"layout": "elk", "mergeEdges": true} }%%
|
||||||
stateDiagram
|
stateDiagram
|
||||||
[*] --> T1
|
[*] --> T1
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export interface MermaidConfig {
|
|||||||
* Defines which main look to use for the diagram.
|
* Defines which main look to use for the diagram.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
look?: 'classic' | 'handdrawn' | 'slick';
|
look?: 'classic' | 'handdrawn';
|
||||||
/**
|
/**
|
||||||
* Defines the seed to be used when using handdrawn look. This is important for the automated tests as they will always find differences without the seed. The default value is 0 which gives a random seed.
|
* Defines the seed to be used when using handdrawn look. This is important for the automated tests as they will always find differences without the seed. The default value is 0 which gives a random seed.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -852,7 +852,7 @@ export const getData = () => {
|
|||||||
|
|
||||||
const n = getVertices();
|
const n = getVertices();
|
||||||
n.forEach((vertex) => {
|
n.forEach((vertex) => {
|
||||||
const node = addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, useRough);
|
const node = addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, config.look);
|
||||||
});
|
});
|
||||||
|
|
||||||
const e = getEdges();
|
const e = getEdges();
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export const trapezoid = async (parent: SVGAElement, node: Node): Promise<SVGAEl
|
|||||||
const { cssStyles } = node;
|
const { cssStyles } = node;
|
||||||
|
|
||||||
if (node.look === 'handdrawn') {
|
if (node.look === 'handdrawn') {
|
||||||
console.log('Trapezoid: Inside use useRough');
|
console.log('Trapezoid: Inside handdrawn block');
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const rc = rough.svg(shapeSvg);
|
const rc = rough.svg(shapeSvg);
|
||||||
const options = userNodeOverrides(node, {});
|
const options = userNodeOverrides(node, {});
|
||||||
|
|||||||
@@ -133,4 +133,4 @@ export function insertPolygonShape(parent, w, h, points) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const getNodeClasses = (node, extra) =>
|
export const getNodeClasses = (node, extra) =>
|
||||||
(node.useRough ? 'rough-node' : 'node') + ' ' + node.cssClasses + ' ' + (extra || '');
|
(node.look === 'handdrawn' ? 'rough-node' : 'node') + ' ' + node.cssClasses + ' ' + (extra || '');
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ properties:
|
|||||||
enum:
|
enum:
|
||||||
- classic
|
- classic
|
||||||
- handdrawn
|
- handdrawn
|
||||||
- slick
|
|
||||||
default: 'classic'
|
default: 'classic'
|
||||||
handdrawnSeed:
|
handdrawnSeed:
|
||||||
description: |
|
description: |
|
||||||
|
|||||||
Reference in New Issue
Block a user