mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-08 16:49:38 +02:00
Merge remote-tracking branch 'os_repo/5237-unified-layout-common-renderer' into alanaV11
This commit is contained in:
@@ -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