mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-15 02:04:08 +01:00
fix: use nested mindmap config for padding and maxWidth
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
@@ -214,8 +214,6 @@ export interface MermaidConfig {
|
|||||||
wrap?: boolean;
|
wrap?: boolean;
|
||||||
fontSize?: number;
|
fontSize?: number;
|
||||||
markdownAutoWrap?: boolean;
|
markdownAutoWrap?: boolean;
|
||||||
padding?: number;
|
|
||||||
useMaxWidth?: boolean;
|
|
||||||
/**
|
/**
|
||||||
* Suppresses inserting 'Syntax error' diagram in the DOM.
|
* Suppresses inserting 'Syntax error' diagram in the DOM.
|
||||||
* This is useful when you want to control how to handle syntax errors in your application.
|
* This is useful when you want to control how to handle syntax errors in your application.
|
||||||
|
|||||||
@@ -75,9 +75,9 @@ export const draw: DrawDefinition = async (text, id, _version, diagObj) => {
|
|||||||
// Setup the view box and size of the svg element using config from data4Layout
|
// Setup the view box and size of the svg element using config from data4Layout
|
||||||
setupViewPortForSVG(
|
setupViewPortForSVG(
|
||||||
svg,
|
svg,
|
||||||
data4Layout.config.padding ?? defaultConfig.mindmap.padding,
|
data4Layout.config.mindmap?.padding ?? defaultConfig.mindmap.padding,
|
||||||
'mindmapDiagram',
|
'mindmapDiagram',
|
||||||
data4Layout.config.useMaxWidth ?? defaultConfig.mindmap.useMaxWidth
|
data4Layout.config.mindmap?.useMaxWidth ?? defaultConfig.mindmap.useMaxWidth
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user