refactor!(git): default to useMaxWidth true

All other diagrams (with the exception of Sankey) default to `true`.

BREAKING CHANGE: Change the default value of `useMaxWidth` for gitgraphs
                 to `true`.
This commit is contained in:
Alois Klink
2024-06-18 01:44:59 +09:00
parent 04c29e2a96
commit 6b5286eff8
2 changed files with 1 additions and 8 deletions

View File

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

View File

@@ -248,13 +248,6 @@ const config: RequiredDeep<MermaidConfig> = {
...defaultConfigJson.requirement,
useWidth: undefined,
},
gitGraph: {
...defaultConfigJson.gitGraph,
// TODO: This is a temporary override for `gitGraph`, since every other
// diagram does have `useMaxWidth`, but instead sets it to `true`.
// Should we set this to `true` instead?
useMaxWidth: false,
},
sankey: {
...defaultConfigJson.sankey,
// this is false, unlike every other diagram (other than gitGraph)