mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-18 11:44:07 +01:00
#5237 Elk spacing tweak and fix for fonthandling in directives
This commit is contained in:
@@ -465,7 +465,7 @@ export const render = async (data4Layout, svg, element, algorithm) => {
|
|||||||
'elk.algorithm': algorithm,
|
'elk.algorithm': algorithm,
|
||||||
'nodePlacement.strategy': 'NETWORK_SIMPLEX',
|
'nodePlacement.strategy': 'NETWORK_SIMPLEX',
|
||||||
|
|
||||||
'spacing.nodeNode': 70,
|
'spacing.nodeNode': 20,
|
||||||
'spacing.nodeNodeBetweenLayers': 25,
|
'spacing.nodeNodeBetweenLayers': 25,
|
||||||
'spacing.edgeNode': 10,
|
'spacing.edgeNode': 10,
|
||||||
'spacing.edgeNodeBetweenLayers': 20,
|
'spacing.edgeNodeBetweenLayers': 20,
|
||||||
|
|||||||
@@ -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 the directive has a fontFamily, but no themeVariables, add the fontFamily to the themeVariables
|
||||||
if (directive.fontFamily && (!directive.themeVariables || !directive.themeVariables.fontFamily)) {
|
if (directive.fontFamily && (!directive.themeVariables || !directive.themeVariables.fontFamily)) {
|
||||||
directive.themeVariables = { fontFamily: directive.fontFamily };
|
directive.themeVariables = {
|
||||||
|
...directive.themeVariables,
|
||||||
|
fontFamily: directive.fontFamily,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
directives.push(directive);
|
directives.push(directive);
|
||||||
|
|||||||
Reference in New Issue
Block a user