From 6d64c75121c9af34194134639597a65c4b9515c4 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Fri, 20 Sep 2024 15:09:29 +0200 Subject: [PATCH] Fix for image --- .../src/rendering-util/layout-algorithms/fixed/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mermaid/src/rendering-util/layout-algorithms/fixed/index.js b/packages/mermaid/src/rendering-util/layout-algorithms/fixed/index.js index 5b889cdaa..19638ee5f 100644 --- a/packages/mermaid/src/rendering-util/layout-algorithms/fixed/index.js +++ b/packages/mermaid/src/rendering-util/layout-algorithms/fixed/index.js @@ -212,7 +212,7 @@ const doRender = async (_elem, data4Layout, siteConfig, positions) => { if (node.isGroup) { node.x = 0; node.y = 0; - await insertCluster(nodes, node, 'TB'); + await insertCluster(nodes, node, { config: siteConfig, dir: 'TB' }); // Don't set the coordinates before they "layout", this will mess up the positioning if (pos) { node.x = pos?.x || 0; @@ -223,7 +223,7 @@ const doRender = async (_elem, data4Layout, siteConfig, positions) => { node.x = pos?.x || 0; node.y = pos?.y || 0; } - await insertNode(nodes, node, 'TB'); + await insertNode(nodes, node, { config: siteConfig, dir: 'TB' }); } nodeDB.set(node.id, node); })