mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-12-02 02:24:20 +01:00
5237 Subgraph handling
This commit is contained in:
@@ -183,8 +183,8 @@ const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, sit
|
|||||||
const halfPadding = node?.padding / 2 || 0;
|
const halfPadding = node?.padding / 2 || 0;
|
||||||
const labelHeight = node?.labelBBox?.height || 0;
|
const labelHeight = node?.labelBBox?.height || 0;
|
||||||
const offsetY = labelHeight - halfPadding || 0;
|
const offsetY = labelHeight - halfPadding || 0;
|
||||||
node.y += offsetY + (parent?.offsetY / 2 || 4);
|
node.y += offsetY + (parent?.offsetY / 2 || 0);
|
||||||
node.offsetY = offsetY;
|
// node.offsetY = offsetY;
|
||||||
insertCluster(clusters, node);
|
insertCluster(clusters, node);
|
||||||
|
|
||||||
// A cluster in the non-recursive way
|
// A cluster in the non-recursive way
|
||||||
|
|||||||
Reference in New Issue
Block a user