#5237 Fix for line-height issue

This commit is contained in:
Knut Sveidqvist
2024-06-28 08:40:04 +02:00
parent 5e6215d4f2
commit b92eae5b34
2 changed files with 4 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
// @ts-ignore: JISON doesn't support types
import flowParser from './parser/flow.jison';
import flowDb from './flowDb.js';
//import flowRendererV2 from './flowRenderer-v2.js';
import flowRendererV2 from './flowRenderer-v2.js';
import flowRendererV3 from './flowRenderer-v3-unified.js';
import flowStyles from './styles.js';
import type { MermaidConfig } from '../../config.type.js';
@@ -20,8 +20,8 @@ export const diagram = {
cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
// flowchart-v2 uses dagre-wrapper, which doesn't have access to flowchart cnf
setConfig({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } });
// flowRendererV2.setConf(cnf.flowchart);
flowRendererV3.setConf(cnf.flowchart);
flowRendererV2.setConf(cnf.flowchart);
// flowRendererV3.setConf(cnf.flowchart);
flowDb.clear();
flowDb.setGen('gen-2');
},

View File

@@ -36,7 +36,7 @@ async function addHtmlSpan(element, node, width, classes, addBackground = false)
applyStyle(div, node.labelStyle);
div.style('display', 'table-cell');
div.style('white-space', 'nowrap');
div.style('line-height', '1');
div.style('line-height', '1.5');
div.style('max-width', width + 'px');
div.attr('xmlns', 'http://www.w3.org/1999/xhtml');
if (addBackground) {