mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Allow Generics support for Class Title definition
This commit is contained in:
parent
a20aa472d6
commit
7164eaa8b1
@ -588,9 +588,14 @@ const class_box = (parent, node) => {
|
||||
maxWidth += interfaceBBox.width;
|
||||
}
|
||||
|
||||
let classTitleString = node.classData.id;
|
||||
|
||||
if (node.classData.type !== undefined && node.classData.type !== '') {
|
||||
classTitleString += '<' + node.classData.type + '>';
|
||||
}
|
||||
const classTitleLabel = labelContainer
|
||||
.node()
|
||||
.appendChild(createLabel(node.labelText, node.labelStyle, true, true));
|
||||
.appendChild(createLabel(classTitleString, node.labelStyle, true, true));
|
||||
let classTitleBBox = classTitleLabel.getBBox();
|
||||
if (getConfig().flowchart.htmlLabels) {
|
||||
const div = classTitleLabel.children[0];
|
||||
|
Loading…
x
Reference in New Issue
Block a user