fix: increase padding for circle shape in mindmap

on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
darshanr0107
2025-08-20 16:28:55 +05:30
parent 1b0bc05fc2
commit 6377d6f64d
2 changed files with 4 additions and 1 deletions

View File

@@ -90,6 +90,8 @@ export const draw: DrawDefinition = async (text, id, _version, diagObj) => {
node.height = 46;
node.width = 92;
node.from = 'mindmap';
} else if (node.shape === 'circle') {
node.from = 'mindmap';
}
});

View File

@@ -12,7 +12,8 @@ export async function circle<T extends SVGGraphicsElement>(parent: D3Selection<T
node.labelStyle = labelStyles;
const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, getNodeClasses(node));
const radius = bbox.width / 2 + halfPadding;
const radius =
node.from === 'mindmap' ? bbox.width / 2 + halfPadding * 2 : bbox.width / 2 + halfPadding;
let circleElem;
const { cssStyles } = node;