added grammar

This commit is contained in:
Christian Klemm
2019-10-04 21:49:02 +02:00
parent 96735dd543
commit 912e850db4
5 changed files with 18 additions and 8 deletions

View File

@@ -264,9 +264,6 @@ const drawClass = function(elem, classDef) {
.attr('y', conf.textHeight + conf.padding)
.attr('x', 0);
// TODO: remove testing code
classDef.annotations = ['interface', 'injected'];
// add annotations
let isFirst = true;
classDef.annotations.forEach(function(member) {
@@ -276,11 +273,12 @@ const drawClass = function(elem, classDef) {
});
// add class title
title
const classTitle = title
.append('tspan')
.text(classDef.id)
.attr('class', 'title')
.attr('dy', conf.textHeight);
.attr('class', 'title');
if (!isFirst) classTitle.attr('dy', conf.textHeight);
const titleHeight = title.node().getBBox().height;
@@ -334,7 +332,6 @@ const drawClass = function(elem, classDef) {
// Center title
title.node().childNodes.forEach(function(x) {
console.dir(x.getBBox());
x.setAttribute('x', (classBox.width + 2 * conf.padding - x.getBBox().width) / 2);
});