mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-09 10:36:43 +02:00
fix: increase padding for circle shape in mindmap
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
@@ -90,6 +90,8 @@ export const draw: DrawDefinition = async (text, id, _version, diagObj) => {
|
|||||||
node.height = 46;
|
node.height = 46;
|
||||||
node.width = 92;
|
node.width = 92;
|
||||||
node.from = 'mindmap';
|
node.from = 'mindmap';
|
||||||
|
} else if (node.shape === 'circle') {
|
||||||
|
node.from = 'mindmap';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -12,7 +12,8 @@ export async function circle<T extends SVGGraphicsElement>(parent: D3Selection<T
|
|||||||
node.labelStyle = labelStyles;
|
node.labelStyle = labelStyles;
|
||||||
const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, getNodeClasses(node));
|
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;
|
let circleElem;
|
||||||
const { cssStyles } = node;
|
const { cssStyles } = node;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user