From ce9d0e2e6a9b286b6dd39b7d4d393348d65c0f57 Mon Sep 17 00:00:00 2001 From: Yokozuna59 Date: Mon, 19 Jun 2023 22:07:15 +0300 Subject: [PATCH] use global useMaxWidth until making setConfig updates pie setConfig --- packages/mermaid/src/diagrams/pie/pieRenderer.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/mermaid/src/diagrams/pie/pieRenderer.ts b/packages/mermaid/src/diagrams/pie/pieRenderer.ts index bbf002ce4..9f9bb1039 100644 --- a/packages/mermaid/src/diagrams/pie/pieRenderer.ts +++ b/packages/mermaid/src/diagrams/pie/pieRenderer.ts @@ -42,7 +42,8 @@ export const draw: DrawDefinition = (txt, id, _version, diagramObject) => { diagramObject.parser.parse(txt); 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 elem?.setAttribute('viewBox', '0 0 ' + width + ' ' + height);