mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-02 11:54:15 +01:00
fix: address failing argos tests
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
@@ -36,10 +36,16 @@ export async function textHelper<T extends SVGGraphicsElement>(
|
||||
|
||||
annotationGroup = shapeSvg.insert('g').attr('class', 'annotation-group text');
|
||||
if (node.annotations.length > 0) {
|
||||
await addText(annotationGroup, { text: `` } as unknown as ClassMember, 0);
|
||||
const annotation = node.annotations[0];
|
||||
|
||||
await addText(annotationGroup, { text: `«${annotation}»` } as unknown as ClassMember, 0);
|
||||
|
||||
annotationGroup.style('opacity', '0');
|
||||
|
||||
const annotationGroupBBox = annotationGroup.node()!.getBBox();
|
||||
annotationGroupHeight = annotationGroupBBox.height;
|
||||
} else {
|
||||
annotationGroupHeight = 0;
|
||||
}
|
||||
|
||||
labelGroup = shapeSvg.insert('g').attr('class', 'label-group text');
|
||||
|
||||
@@ -53,6 +53,10 @@ g.clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
g.annotation-group[style*="opacity: 0"] {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
g.classGroup rect {
|
||||
fill: ${options.mainBkg};
|
||||
stroke: ${options.nodeBorder};
|
||||
|
||||
Reference in New Issue
Block a user