Fix for image

This commit is contained in:
Knut Sveidqvist
2024-09-20 15:09:29 +02:00
parent e67894fbb3
commit 6d64c75121

View File

@@ -212,7 +212,7 @@ const doRender = async (_elem, data4Layout, siteConfig, positions) => {
if (node.isGroup) { if (node.isGroup) {
node.x = 0; node.x = 0;
node.y = 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 // Don't set the coordinates before they "layout", this will mess up the positioning
if (pos) { if (pos) {
node.x = pos?.x || 0; node.x = pos?.x || 0;
@@ -223,7 +223,7 @@ const doRender = async (_elem, data4Layout, siteConfig, positions) => {
node.x = pos?.x || 0; node.x = pos?.x || 0;
node.y = pos?.y || 0; node.y = pos?.y || 0;
} }
await insertNode(nodes, node, 'TB'); await insertNode(nodes, node, { config: siteConfig, dir: 'TB' });
} }
nodeDB.set(node.id, node); nodeDB.set(node.id, node);
}) })