mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-20 00:36:44 +02:00
Add flowchart.diagramPadding
config option
This option lets you customise the padding around the whole flowchart. It is equivalent to `er.diagramPadding` and defaults to 8px for backwards compatibility with the current hardcoded value.
This commit is contained in:
@@ -671,4 +671,18 @@ describe('Flowchart', () => {
|
||||
{ flowchart: { htmlLabels: false } }
|
||||
);
|
||||
});
|
||||
|
||||
it('33: should render a simple flowchart with diagramPadding set to 0', () => {
|
||||
imgSnapshotTest(
|
||||
`graph TD
|
||||
A[Christmas] -->|Get money| B(Go shopping)
|
||||
B --> C{Let me think}
|
||||
%% this is a comment
|
||||
C -->|One| D[Laptop]
|
||||
C -->|Two| E[iPhone]
|
||||
C -->|Three| F[fa:fa-car Car]
|
||||
`,
|
||||
{ flowchart: { diagramPadding: 0 } }
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user