mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-22 16:59:48 +02:00
Merge branch '5237-unified-layout-common-renderer' of github.com:mermaid-js/mermaid into 5237-unified-layout-common-renderer
This commit is contained in:
@@ -795,10 +795,10 @@ const addNodeFromVertex = (
|
||||
config: any,
|
||||
look: string
|
||||
) => {
|
||||
let parentId = parentDB.get(vertex.id);
|
||||
let isGroup = subGraphDB.get(vertex.id) || false;
|
||||
const parentId = parentDB.get(vertex.id);
|
||||
const isGroup = subGraphDB.get(vertex.id) || false;
|
||||
|
||||
let node = findNode(nodes, vertex.id);
|
||||
const node = findNode(nodes, vertex.id);
|
||||
if (!node) {
|
||||
nodes.push({
|
||||
id: vertex.id,
|
||||
@@ -852,7 +852,7 @@ export const getData = () => {
|
||||
|
||||
const n = getVertices();
|
||||
n.forEach((vertex) => {
|
||||
const node = addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, config.look);
|
||||
addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, config.look);
|
||||
});
|
||||
|
||||
const e = getEdges();
|
||||
@@ -874,7 +874,6 @@ export const getData = () => {
|
||||
pattern: rawEdge.stroke,
|
||||
look: config.look,
|
||||
};
|
||||
console.log('rawEdge SPLIT', rawEdge, index);
|
||||
edges.push(edge);
|
||||
});
|
||||
|
||||
|
@@ -188,17 +188,6 @@ const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, sit
|
||||
insertCluster(clusters, node);
|
||||
|
||||
// A cluster in the non-recursive way
|
||||
console.log(
|
||||
'A tainted cluster node with children XBX',
|
||||
v,
|
||||
node.id,
|
||||
node.width,
|
||||
node.height,
|
||||
node.x,
|
||||
node.y,
|
||||
'offset',
|
||||
parent?.offsetY
|
||||
);
|
||||
clusterDb[node.id].node = node;
|
||||
} else {
|
||||
const parent = graph.node(node.parentId);
|
||||
|
@@ -287,7 +287,7 @@ const roundedWithTitle = (parent, node) => {
|
||||
const rectBox = rect.node().getBBox();
|
||||
node.height = rectBox.height;
|
||||
node.offsetX = 0;
|
||||
// Used by payout engone to position subgraph in parent
|
||||
// Used by layout engine to position subgraph in parent
|
||||
node.offsetY = bbox.height - node.padding / 2;
|
||||
node.labelBBox = bbox;
|
||||
|
||||
|
@@ -37,8 +37,7 @@ export const trapezoid = async (parent: SVGAElement, node: Node): Promise<SVGAEl
|
||||
const { cssStyles } = node;
|
||||
|
||||
if (node.look === 'handdrawn') {
|
||||
console.log('Trapezoid: Inside handdrawn block');
|
||||
// @ts-ignore
|
||||
// @ts-ignore - rough is not typed
|
||||
const rc = rough.svg(shapeSvg);
|
||||
const options = userNodeOverrides(node, {});
|
||||
const pathData = createTrapezoidPathD(0, 0, w, h);
|
||||
|
Reference in New Issue
Block a user