#5237 Elk spacing tweak and fix for fonthandling in directives

This commit is contained in:
Knut Sveidqvist
2024-05-23 11:12:36 +02:00
parent 47776e3ca1
commit 8d23b684f5
2 changed files with 5 additions and 2 deletions

View File

@@ -465,7 +465,7 @@ export const render = async (data4Layout, svg, element, algorithm) => {
'elk.algorithm': algorithm,
'nodePlacement.strategy': 'NETWORK_SIMPLEX',
'spacing.nodeNode': 70,
'spacing.nodeNode': 20,
'spacing.nodeNodeBetweenLayers': 25,
'spacing.edgeNode': 10,
'spacing.edgeNodeBetweenLayers': 20,

View File

@@ -190,7 +190,10 @@ export const addDirective = (directive: MermaidConfig) => {
// If the directive has a fontFamily, but no themeVariables, add the fontFamily to the themeVariables
if (directive.fontFamily && (!directive.themeVariables || !directive.themeVariables.fontFamily)) {
directive.themeVariables = { fontFamily: directive.fontFamily };
directive.themeVariables = {
...directive.themeVariables,
fontFamily: directive.fontFamily,
};
}
directives.push(directive);