Add support for Generic class definitions

Added support in parser to translate characters surrounded by `~` into generic type definition ie: `Class01~T~` would turn into `Class01<T>`
This commit is contained in:
Justin Greywolf
2019-12-05 12:55:46 -08:00
parent 91d986970b
commit 2a41280076
6 changed files with 161 additions and 8 deletions

View File

@@ -318,10 +318,16 @@ const drawClass = function(elem, classDef) {
isFirst = false;
});
let classTitleString = classDef.id;
if(classDef.genericType !== undefined && classDef.genericType !== ''){
classTitleString += '<' + classDef.genericType + '>';
}
// add class title
const classTitle = title
.append('tspan')
.text(classDef.id)
.text(classTitleString)
.attr('class', 'title');
// If class has annotations the title needs to have an offset of the text height