mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
fix: Fixed git graph to use global setting if useMaxWidth
option is not set
This commit is contained in:
parent
627ddc0774
commit
319f925bdd
@ -495,7 +495,8 @@ const drawBranches = (svg, branches) => {
|
||||
*/
|
||||
export const draw = function (txt, id, ver, diagObj) {
|
||||
clear();
|
||||
const gitGraphConfig = getConfig().gitGraph;
|
||||
const conf = getConfig();
|
||||
const gitGraphConfig = conf.gitGraph;
|
||||
// try {
|
||||
log.debug('in gitgraph renderer', txt + '\n', 'id:', id, ver);
|
||||
|
||||
@ -522,7 +523,12 @@ export const draw = function (txt, id, ver, diagObj) {
|
||||
drawCommits(diagram, allCommitsDict, true);
|
||||
|
||||
// Setup the view box and size of the svg element
|
||||
setupGraphViewbox(undefined, diagram, gitGraphConfig.diagramPadding, gitGraphConfig.useMaxWidth);
|
||||
setupGraphViewbox(
|
||||
undefined,
|
||||
diagram,
|
||||
gitGraphConfig.diagramPadding,
|
||||
gitGraphConfig.useMaxWidth ?? conf.useMaxWidth
|
||||
);
|
||||
};
|
||||
|
||||
export default {
|
||||
|
Loading…
x
Reference in New Issue
Block a user