mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-21 06:53:17 +08:00
use global useMaxWidth until making setConfig updates pie setConfig
This commit is contained in:
parent
ae8860eec3
commit
ce9d0e2e6a
@ -42,7 +42,8 @@ export const draw: DrawDefinition = (txt, id, _version, diagramObject) => {
|
|||||||
diagramObject.parser.parse(txt);
|
diagramObject.parser.parse(txt);
|
||||||
|
|
||||||
const diagram = root.select('#' + id);
|
const diagram = root.select('#' + id);
|
||||||
configureSvgSize(diagram, height, width, config.useMaxWidth);
|
// TODO: use global `useMaxWidth` until making setConfig update pie setConfig
|
||||||
|
configureSvgSize(diagram, height, width, globalConfig?.pie?.useMaxWidth ?? true);
|
||||||
|
|
||||||
// Set viewBox
|
// Set viewBox
|
||||||
elem?.setAttribute('viewBox', '0 0 ' + width + ' ' + height);
|
elem?.setAttribute('viewBox', '0 0 ' + width + ' ' + height);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user