mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 14:59:53 +02:00
Merge remote-tracking branch 'os_repo/5237-unified-layout-common-renderer' into alanaV11
This commit is contained in:
@@ -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,11 +154,32 @@ flowchart LR
|
||||
Apa --- C
|
||||
A --x C
|
||||
|
||||
<pre id="diagram" class="mermaid">
|
||||
<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
|
||||
S:Stillas
|
||||
T:Tiger
|
||||
U:Ulv
|
||||
direction TB
|
||||
A --> B
|
||||
A --> C
|
||||
A --> D
|
||||
A --> E
|
||||
A --> F
|
||||
state F {
|
||||
Another
|
||||
}
|
||||
Another --> A
|
||||
|
||||
|
||||
</pre
|
||||
>
|
||||
<pre id="diagram" class="mermaid2">
|
||||
@@ -211,7 +232,7 @@ flowchart
|
||||
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
|
||||
@@ -232,7 +253,7 @@ State T1 {
|
||||
}
|
||||
</pre
|
||||
>
|
||||
<pre id="diagram" class="mermaid">
|
||||
<pre id="diagram" class="mermaid2">
|
||||
%%{init: {"layouts": "elk2", "mergeEdges": true} }%%
|
||||
stateDiagram
|
||||
State S1 {
|
||||
@@ -242,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 {
|
||||
@@ -252,7 +273,7 @@ State T1 {
|
||||
}
|
||||
</pre
|
||||
>
|
||||
<pre id="diagram" class="mermaid">
|
||||
<pre id="diagram" class="mermaid2">
|
||||
%%{init: {"layout": "elk", "mergeEdges": true} }%%
|
||||
stateDiagram
|
||||
[*] --> T1
|
||||
|
@@ -822,8 +822,6 @@ export const getData = () => {
|
||||
const nodes: Node[] = [];
|
||||
const edges: Edge[] = [];
|
||||
|
||||
// extract(getRootDocV2());
|
||||
// const diagramStates = getStates();
|
||||
const subGraphs = getSubGraphs();
|
||||
log.info('Subgraphs - APA12', subGraphs);
|
||||
const parentDB = new Map<string, string>();
|
||||
|
@@ -61,11 +61,9 @@ const setupDoc = (parentParsedItem, doc, diagramStates, nodes, edges, altFlag, l
|
||||
switch (item.stmt) {
|
||||
case STMT_STATE:
|
||||
dataFetcher(parentParsedItem, item, diagramStates, nodes, edges, altFlag, look);
|
||||
|
||||
break;
|
||||
case DEFAULT_STATE_TYPE:
|
||||
dataFetcher(parentParsedItem, item, diagramStates, nodes, edges, altFlag, look);
|
||||
|
||||
break;
|
||||
case STMT_RELATION:
|
||||
{
|
||||
|
@@ -230,7 +230,7 @@ const extract = (_doc) => {
|
||||
const config = getConfig();
|
||||
const look = config.look;
|
||||
resetDataFetching();
|
||||
dataFetcher(undefined, getRootDocV2(), diagramStates, nodes, edges, true,look);
|
||||
dataFetcher(undefined, getRootDocV2(), diagramStates, nodes, edges, true, look);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -20,7 +20,7 @@ export const doublecircle = async (parent: SVGAElement, node: Node): Promise<SVG
|
||||
let circleGroup;
|
||||
const { cssStyles } = node;
|
||||
|
||||
if (node.look === 'handdrawn') {e
|
||||
if (node.look === 'handdrawn') {
|
||||
// @ts-ignore - rough is not typed
|
||||
const rc = rough.svg(shapeSvg);
|
||||
const outerOptions = userNodeOverrides(node, { roughness: 0.2, strokeWidth: 2.5 });
|
||||
|
@@ -32,6 +32,7 @@ export const drawRect = async (parent: SVGAElement, node: Node, options: RectOpt
|
||||
rx = options.rx;
|
||||
ry = options.ry;
|
||||
}
|
||||
|
||||
if (node.look === 'handdrawn') {
|
||||
// @ts-ignore TODO: Fix rough typings
|
||||
const rc = rough.svg(shapeSvg);
|
||||
|
@@ -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 handdrawn');
|
||||
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 || '');
|
||||
|
@@ -62,7 +62,6 @@ interface Node {
|
||||
x?: number;
|
||||
y?: number;
|
||||
|
||||
// Added look to handle
|
||||
look?: string;
|
||||
}
|
||||
|
||||
@@ -94,7 +93,6 @@ interface Edge {
|
||||
minlen?: number;
|
||||
pattern?: string;
|
||||
thickness?: 'normal' | 'thick' | 'invisible';
|
||||
|
||||
look?: string;
|
||||
}
|
||||
|
||||
|
@@ -78,7 +78,6 @@ properties:
|
||||
enum:
|
||||
- classic
|
||||
- handdrawn
|
||||
- slick
|
||||
default: 'classic'
|
||||
handdrawnSeed:
|
||||
description: |
|
||||
|
Reference in New Issue
Block a user