mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-14 17:54:13 +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;
|
||||
fontSize?: number;
|
||||
markdownAutoWrap?: boolean;
|
||||
padding?: number;
|
||||
useMaxWidth?: boolean;
|
||||
/**
|
||||
* Suppresses inserting 'Syntax error' diagram in the DOM.
|
||||
* 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
|
||||
setupViewPortForSVG(
|
||||
svg,
|
||||
data4Layout.config.padding ?? defaultConfig.mindmap.padding,
|
||||
data4Layout.config.mindmap?.padding ?? defaultConfig.mindmap.padding,
|
||||
'mindmapDiagram',
|
||||
data4Layout.config.useMaxWidth ?? defaultConfig.mindmap.useMaxWidth
|
||||
data4Layout.config.mindmap?.useMaxWidth ?? defaultConfig.mindmap.useMaxWidth
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user