mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-15 13:29:40 +02:00
Fixes for rendering tests
This commit is contained in:
@@ -847,9 +847,12 @@ const _drawTextCandidateFunc = (function () {
|
||||
function byTspan(content, g, x, y, width, height, textAttrs, conf) {
|
||||
const { actorFontSize, actorFontFamily, actorFontWeight } = conf;
|
||||
|
||||
let _actorFontSize =
|
||||
actorFontSize && actorFontSize.replace ? actorFontSize.replace('px', '') : actorFontSize;
|
||||
|
||||
const lines = content.split(common.lineBreakRegex);
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
const dy = i * actorFontSize - (actorFontSize * (lines.length - 1)) / 2;
|
||||
const dy = i * _actorFontSize - (_actorFontSize * (lines.length - 1)) / 2;
|
||||
const text = g
|
||||
.append('text')
|
||||
.attr('x', x + width / 2)
|
||||
|
Reference in New Issue
Block a user