use global useMaxWidth until making setConfig updates pie setConfig

This commit is contained in:
Yokozuna59 2023-06-19 22:07:15 +03:00
parent ae8860eec3
commit ce9d0e2e6a

View File

@ -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);