mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
updated taggedRect
This commit is contained in:
parent
58463b5e80
commit
9926ae4e74
@ -24,16 +24,16 @@ export const taggedRect = async (parent: SVGAElement, node: Node) => {
|
||||
const options = userNodeOverrides(node, {});
|
||||
|
||||
const rectPoints = [
|
||||
{ x: x - tagWidth, y },
|
||||
{ x: x + w, y },
|
||||
{ x: x + w, y: y + h },
|
||||
{ x: x - tagWidth, y: y + h },
|
||||
{ x: x - tagWidth / 2, y },
|
||||
{ x: x + w + tagWidth / 2, y },
|
||||
{ x: x + w + tagWidth / 2, y: y + h },
|
||||
{ x: x - tagWidth / 2, y: y + h },
|
||||
];
|
||||
|
||||
const tagPoints = [
|
||||
{ x: x + w - tagWidth, y: y + h },
|
||||
{ x: x + w, y: y + h },
|
||||
{ x: x + w, y: y + h - tagHeight },
|
||||
{ x: x + w - tagWidth / 2, y: y + h },
|
||||
{ x: x + w + tagWidth / 2, y: y + h },
|
||||
{ x: x + w + tagWidth / 2, y: y + h - tagHeight },
|
||||
];
|
||||
|
||||
if (node.look !== 'handDrawn') {
|
||||
@ -59,9 +59,6 @@ export const taggedRect = async (parent: SVGAElement, node: Node) => {
|
||||
if (nodeStyles && node.look !== 'handDrawn') {
|
||||
taggedRect.selectAll('path').attr('style', nodeStyles);
|
||||
}
|
||||
taggedRect.attr('transform', `translate(${tagWidth / 2}, 0)`);
|
||||
|
||||
taggedRect.attr('transform', `translate(${tagWidth / 2}, 0)`);
|
||||
|
||||
updateNodeBounds(node, taggedRect);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user