diff --git a/packages/mermaid/src/rendering-util/rendering-elements/shapes/drawRect.ts b/packages/mermaid/src/rendering-util/rendering-elements/shapes/drawRect.ts index d540fb8c5..a1d31a9ce 100644 --- a/packages/mermaid/src/rendering-util/rendering-elements/shapes/drawRect.ts +++ b/packages/mermaid/src/rendering-util/rendering-elements/shapes/drawRect.ts @@ -14,13 +14,13 @@ export const drawRect = async (parent: SVGAElement, node: Node, options: RectOpt // if so set it to min value if (node.width || node.height) { node.width = (node?.width ?? 0) - options.labelPaddingX * 2; - if (node.width < 50) { - node.width = 50; + if (node.width < 20) { + node.width = 20; } node.height = (node?.height ?? 0) - options.labelPaddingY * 2; - if (node.height < 50) { - node.height = 50; + if (node.height < 10) { + node.height = 10; } } diff --git a/packages/mermaid/src/rendering-util/rendering-elements/shapes/question.ts b/packages/mermaid/src/rendering-util/rendering-elements/shapes/question.ts index 6d4934f96..1b62031e9 100644 --- a/packages/mermaid/src/rendering-util/rendering-elements/shapes/question.ts +++ b/packages/mermaid/src/rendering-util/rendering-elements/shapes/question.ts @@ -22,13 +22,13 @@ export const question = async (parent: SVGAElement, node: Node): Promise { // if so set it to min value if (node.width || node.height) { node.width = (node?.width ?? 0) - labelPaddingX * 2; - if (node.width < 50) { - node.width = 50; + if (node.width < 20) { + node.width = 20; } node.height = (node?.height ?? 0) - labelPaddingY * 2; - if (node.height < 50) { - node.height = 50; + if (node.height < 10) { + node.height = 10; } } const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));