mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
#5237 Handling remaining references to useRough
This commit is contained in:
parent
f19a9d021f
commit
a35152843f
@ -85,7 +85,7 @@ end
|
||||
Apa --> C
|
||||
</pre
|
||||
>
|
||||
<pre id="diagram" class="mermaid">
|
||||
<pre id="diagram" class="mermaid2">
|
||||
flowchart LR
|
||||
subgraph Apa["Apa"]
|
||||
B["This is B"]
|
||||
@ -95,7 +95,7 @@ end
|
||||
Apa --> C
|
||||
</pre
|
||||
>
|
||||
<pre id="diagram" class="mermaid">
|
||||
<pre id="diagram" class="mermaid2">
|
||||
flowchart RL
|
||||
subgraph Apa["Apa"]
|
||||
subgraph Gorilla
|
||||
@ -107,7 +107,7 @@ end
|
||||
Gorilla --> C
|
||||
</pre
|
||||
>
|
||||
<pre id="diagram" class="mermaid">
|
||||
<pre id="diagram" class="mermaid2">
|
||||
flowchart LR
|
||||
subgraph Apa["Apa"]
|
||||
subgraph Gorilla
|
||||
@ -154,6 +154,32 @@ flowchart LR
|
||||
Apa --- 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 id="diagram" class="mermaid2">
|
||||
@ -180,6 +206,12 @@ flowchart LR
|
||||
|
||||
</pre
|
||||
>
|
||||
<pre id="diagram" class="mermaid2">
|
||||
%%{init: {"layout": "elk", "mergeEdges": true} }%%
|
||||
flowchart
|
||||
A --> B(This is B)
|
||||
</pre
|
||||
>
|
||||
<pre id="diagram" class="mermaid2">
|
||||
%%{init: {"layout": "elk", "mergeEdges": false, "elk.nodePlacement.strategy": "SIMPLE"} }%%
|
||||
stateDiagram
|
||||
@ -200,7 +232,7 @@ flowchart LR
|
||||
if_state --> True : if n >= 0
|
||||
</pre
|
||||
>
|
||||
<pre id="diagram" class="mermaid">
|
||||
<pre id="diagram" class="mermaid2">
|
||||
%%{init: {"layout": "dagre", "mergeEdges": true} }%%
|
||||
stateDiagram
|
||||
direction TB
|
||||
@ -221,7 +253,7 @@ State T1 {
|
||||
}
|
||||
</pre
|
||||
>
|
||||
<pre id="diagram" class="mermaid">
|
||||
<pre id="diagram" class="mermaid2">
|
||||
%%{init: {"layouts": "elk2", "mergeEdges": true} }%%
|
||||
stateDiagram
|
||||
State S1 {
|
||||
@ -231,7 +263,7 @@ State T1 {
|
||||
S1 --> S2
|
||||
</pre
|
||||
>
|
||||
<pre id="diagram" class="mermaid">
|
||||
<pre id="diagram" class="mermaid2">
|
||||
%%{init: {"layout": "elk", "mergeEdges": true} }%%
|
||||
stateDiagram
|
||||
State T1 {
|
||||
@ -241,7 +273,7 @@ State T1 {
|
||||
}
|
||||
</pre
|
||||
>
|
||||
<pre id="diagram" class="mermaid">
|
||||
<pre id="diagram" class="mermaid2">
|
||||
%%{init: {"layout": "elk", "mergeEdges": true} }%%
|
||||
stateDiagram
|
||||
[*] --> T1
|
||||
|
@ -68,7 +68,7 @@ export interface MermaidConfig {
|
||||
* 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.
|
||||
*
|
||||
|
@ -852,7 +852,7 @@ export const getData = () => {
|
||||
|
||||
const n = getVertices();
|
||||
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();
|
||||
|
@ -37,7 +37,7 @@ export const trapezoid = async (parent: SVGAElement, node: Node): Promise<SVGAEl
|
||||
const { cssStyles } = node;
|
||||
|
||||
if (node.look === 'handdrawn') {
|
||||
console.log('Trapezoid: Inside use useRough');
|
||||
console.log('Trapezoid: Inside handdrawn block');
|
||||
// @ts-ignore
|
||||
const rc = rough.svg(shapeSvg);
|
||||
const options = userNodeOverrides(node, {});
|
||||
|
@ -133,4 +133,4 @@ export function insertPolygonShape(parent, w, h, points) {
|
||||
}
|
||||
|
||||
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:
|
||||
- classic
|
||||
- handdrawn
|
||||
- slick
|
||||
default: 'classic'
|
||||
handdrawnSeed:
|
||||
description: |
|
||||
|
Loading…
x
Reference in New Issue
Block a user