mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-09 18:39:41 +02:00
Merge pull request #3652 from uttk/bug/3651_git_graph_option
fix: Fix useMaxWidth option for git graph
This commit is contained in:
@@ -496,7 +496,7 @@ const drawBranches = (svg, branches) => {
|
|||||||
export const draw = function (txt, id, ver, diagObj) {
|
export const draw = function (txt, id, ver, diagObj) {
|
||||||
clear();
|
clear();
|
||||||
const conf = getConfig();
|
const conf = getConfig();
|
||||||
const gitGraphConfig = getConfig().gitGraph;
|
const gitGraphConfig = conf.gitGraph;
|
||||||
// try {
|
// try {
|
||||||
log.debug('in gitgraph renderer', txt + '\n', 'id:', id, ver);
|
log.debug('in gitgraph renderer', txt + '\n', 'id:', id, ver);
|
||||||
|
|
||||||
@@ -523,7 +523,12 @@ export const draw = function (txt, id, ver, diagObj) {
|
|||||||
drawCommits(diagram, allCommitsDict, true);
|
drawCommits(diagram, allCommitsDict, true);
|
||||||
|
|
||||||
// Setup the view box and size of the svg element
|
// Setup the view box and size of the svg element
|
||||||
setupGraphViewbox(undefined, diagram, gitGraphConfig.diagramPadding, conf.useMaxWidth);
|
setupGraphViewbox(
|
||||||
|
undefined,
|
||||||
|
diagram,
|
||||||
|
gitGraphConfig.diagramPadding,
|
||||||
|
gitGraphConfig.useMaxWidth ?? conf.useMaxWidth
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
Reference in New Issue
Block a user