refactor!(sankey): default to useMaxWidth true

All other diagrams default to `useMaxWidth` `true`.

BREAKING CHANGE: Change the default value of `useMaxWidth` for sankey
                 diagrams to `true`.
This commit is contained in:
Alois Klink
2024-08-20 18:51:49 +09:00
parent 6b5286eff8
commit d82958d73d
2 changed files with 1 additions and 7 deletions

View File

@@ -14,7 +14,7 @@
#### Defined in #### Defined in
[packages/mermaid/src/defaultConfig.ts:272](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/defaultConfig.ts#L272) [packages/mermaid/src/defaultConfig.ts:266](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/defaultConfig.ts#L266)
--- ---

View File

@@ -248,12 +248,6 @@ const config: RequiredDeep<MermaidConfig> = {
...defaultConfigJson.requirement, ...defaultConfigJson.requirement,
useWidth: undefined, useWidth: undefined,
}, },
sankey: {
...defaultConfigJson.sankey,
// this is false, unlike every other diagram (other than gitGraph)
// TODO: can we make this default to `true` instead?
useMaxWidth: false,
},
packet: { packet: {
...defaultConfigJson.packet, ...defaultConfigJson.packet,
}, },