mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Generic Type support for classes
Fixed typos after refactor
This commit is contained in:
parent
6a9b251be1
commit
2eaa7f1ab6
@ -361,7 +361,7 @@ describe('class diagram, ', function () {
|
||||
const relations = parser.yy.getRelations();
|
||||
|
||||
expect(parser.yy.getClass('Class01').id).toBe('Class01');
|
||||
expect(parser.yy.getClass('Class01').genericType).toBe('T');
|
||||
expect(parser.yy.getClass('Class01').type).toBe('T');
|
||||
expect(parser.yy.getClass('Class02').id).toBe('Class02');
|
||||
expect(relations[0].relation.type1).toBe(classDb.relationType.EXTENSION);
|
||||
expect(relations[0].relation.type2).toBe('none');
|
||||
|
@ -320,8 +320,8 @@ const drawClass = function(elem, classDef) {
|
||||
|
||||
let classTitleString = classDef.id;
|
||||
|
||||
if (classDef.genericType !== undefined && classDef.genericType !== '') {
|
||||
classTitleString += '<' + classDef.genericType + '>';
|
||||
if (classDef.type !== undefined && classDef.type !== '') {
|
||||
classTitleString += '<' + classDef.type + '>';
|
||||
}
|
||||
|
||||
// add class title
|
||||
|
Loading…
x
Reference in New Issue
Block a user