fix for label positioning for brances shape

This commit is contained in:
Ashish Jain
2024-10-02 21:22:01 +02:00
parent 962fcb8ba8
commit 971a166073

View File

@@ -133,11 +133,7 @@ export const curlyBraces = async (parent: SVGAElement, node: Node) => {
curlyBracesShape.attr('transform', `translate(${radius - radius / 4}, 0)`); curlyBracesShape.attr('transform', `translate(${radius - radius / 4}, 0)`);
label.attr( label.attr('transform', `translate(${-bbox.width / 2}, ${-bbox.height / 2})`);
'transform',
`translate(${-w / 2 + labelPaddingX / 2 - (bbox.x - (bbox.left ?? 0))},${-(labelPaddingY / 2) - (bbox.y - (bbox.top ?? 0))})`
);
updateNodeBounds(node, curlyBracesShape); updateNodeBounds(node, curlyBracesShape);
node.intersect = function (point) { node.intersect = function (point) {