From 2eaa7f1ab6425445d54a67b2a23ae2ce37a7d642 Mon Sep 17 00:00:00 2001 From: Justin Greywolf Date: Tue, 10 Dec 2019 11:39:25 -0800 Subject: [PATCH] Generic Type support for classes Fixed typos after refactor --- src/diagrams/class/classDiagram.spec.js | 2 +- src/diagrams/class/classRenderer.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/diagrams/class/classDiagram.spec.js b/src/diagrams/class/classDiagram.spec.js index 1d13f5158..47e983dd6 100644 --- a/src/diagrams/class/classDiagram.spec.js +++ b/src/diagrams/class/classDiagram.spec.js @@ -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'); diff --git a/src/diagrams/class/classRenderer.js b/src/diagrams/class/classRenderer.js index 67f78aa5b..5287c5ee9 100644 --- a/src/diagrams/class/classRenderer.js +++ b/src/diagrams/class/classRenderer.js @@ -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