From 7c26148252c7d24844b061119eec1f030dc66e17 Mon Sep 17 00:00:00 2001 From: omkarht Date: Fri, 23 Aug 2024 19:55:15 +0530 Subject: [PATCH] fixed padding for flippedTriangle shape --- .../rendering-util/rendering-elements/shapes/flippedTriangle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/src/rendering-util/rendering-elements/shapes/flippedTriangle.ts b/packages/mermaid/src/rendering-util/rendering-elements/shapes/flippedTriangle.ts index e816eac38a..9fb2582c7c 100644 --- a/packages/mermaid/src/rendering-util/rendering-elements/shapes/flippedTriangle.ts +++ b/packages/mermaid/src/rendering-util/rendering-elements/shapes/flippedTriangle.ts @@ -55,7 +55,7 @@ export const flippedTriangle = async (parent: SVGAElement, node: Node): Promise< label.attr( 'transform', - `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${-h / 2 + (bbox.y - (bbox.top ?? 0))})` + `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${-h / 2 + (node.padding ?? 0) / 2 + (bbox.y - (bbox.top ?? 0))})` ); node.intersect = function (point) {