mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-14 11:39:40 +02:00
Fix sequence diagram node text alignment
This commit is contained in:
@@ -258,7 +258,11 @@ const _drawTextCandidateFunc = (function () {
|
|||||||
.style('text-anchor', 'middle')
|
.style('text-anchor', 'middle')
|
||||||
text.append('tspan')
|
text.append('tspan')
|
||||||
.attr('x', x + width / 2).attr('dy', '0')
|
.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)
|
_setTextAttrs(text, textAttrs)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user