From eeeb5fcdd9970af29a9c5112feb7bbf34b21d452 Mon Sep 17 00:00:00 2001 From: saurabhg772244 Date: Fri, 20 Sep 2024 13:34:54 +0530 Subject: [PATCH] updated icon shape label --- .../rendering-util/rendering-elements/shapes/iconCircle.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/mermaid/src/rendering-util/rendering-elements/shapes/iconCircle.ts b/packages/mermaid/src/rendering-util/rendering-elements/shapes/iconCircle.ts index e7551ca65..3b624a97f 100644 --- a/packages/mermaid/src/rendering-util/rendering-elements/shapes/iconCircle.ts +++ b/packages/mermaid/src/rendering-util/rendering-elements/shapes/iconCircle.ts @@ -65,17 +65,17 @@ export const iconCircle = async ( const outerShape = shapeSvg.insert(() => outerNode); iconElem.attr( 'transform', - `translate(${-iconWidth / 2 - iconX},${topLabel ? diameter / 2 - iconHeight - padding + bbox.height / 2 - iconY : -diameter / 2 + padding - bbox.height / 2 - labelPadding / 2 - iconY})` + `translate(${-iconWidth / 2 - iconX},${topLabel ? diameter / 2 - iconHeight - padding + bbox.height / 2 - iconY + labelPadding / 2 : -diameter / 2 + padding - bbox.height / 2 - labelPadding / 2 - iconY})` ); iconElem.selectAll('path').attr('fill', stylesMap.get('stroke') || nodeBorder); label.attr( 'transform', - `translate(${-bbox.width / 2},${topLabel ? -diameter / 2 - bbox.height / 2 : diameter / 2 - bbox.height / 2 + labelPadding / 2})` + `translate(${-bbox.width / 2},${topLabel ? -diameter / 2 - bbox.height / 2 - labelPadding / 2 : diameter / 2 - bbox.height / 2 + labelPadding / 2})` ); iconShape.attr( 'transform', - `translate(${0},${topLabel ? bbox.height / 2 : -bbox.height / 2 - labelPadding / 2})` + `translate(${0},${topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2})` ); updateNodeBounds(node, outerShape);