Fix sequence diagram node text alignment

This commit is contained in:
Tyler Long 2018-03-09 09:09:41 +08:00
parent cf2b415cd3
commit dfb1095908
1 changed files with 5 additions and 1 deletions

View File

@ -258,7 +258,11 @@ const _drawTextCandidateFunc = (function () {
.style('text-anchor', 'middle')
text.append('tspan')
.attr('x', x + width / 2).attr('dy', '0')
.text(content) // todo: fix position y
.text(content)
text.attr('y', y + height / 2.0)
.attr('dominant-baseline', 'central')
.attr('alignment-baseline', 'central')
_setTextAttrs(text, textAttrs)
}