fix: Fix useMaxWidth option for git graph

This commit is contained in:
uttk
2022-10-12 02:14:56 +00:00
parent 9660b0e9fb
commit 627ddc0774

View File

@@ -495,7 +495,6 @@ const drawBranches = (svg, branches) => {
*/
export const draw = function (txt, id, ver, diagObj) {
clear();
const conf = getConfig();
const gitGraphConfig = getConfig().gitGraph;
// try {
log.debug('in gitgraph renderer', txt + '\n', 'id:', id, ver);
@@ -523,7 +522,7 @@ 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, conf.useMaxWidth);
setupGraphViewbox(undefined, diagram, gitGraphConfig.diagramPadding, gitGraphConfig.useMaxWidth);
};
export default {