#3409 Fixed the truncated tags issue

This commit is contained in:
ashishj
2022-09-13 18:23:24 +02:00
parent 3d32280c49
commit d60ce53e05
2 changed files with 28 additions and 14 deletions

View File

@@ -1,7 +1,6 @@
import { select } from 'd3';
import { configureSvgSize } from '../../setupGraphViewbox';
import { getConfig,setupGraphViewbox } from '../../diagram-api/diagramAPI';
import { log } from '../../logger';
import { getConfig } from '../../config';
import addSVGAccessibilityFields from '../../accessibility';
let allCommitsDict = {};
@@ -542,18 +541,8 @@ export const draw = function (txt, id, ver, diagObj) {
drawArrows(diagram, allCommitsDict);
drawCommits(diagram, allCommitsDict, true);
const padding = gitGraphConfig.diagramPadding;
const svgBounds = diagram.node().getBBox();
const width = svgBounds.width + padding * 2;
const height = svgBounds.height + padding * 2;
configureSvgSize(diagram, height, width, conf.useMaxWidth);
const vBox = `${
svgBounds.x -
padding -
(gitGraphConfig.showBranches && gitGraphConfig.rotateCommitLabel === true ? 30 : 0)
} ${svgBounds.y - padding} ${width} ${height}`;
diagram.attr('viewBox', vBox);
// Setup the view box and size of the svg element
setupGraphViewbox(undefined, diagram, gitGraphConfig.diagramPadding, conf.useMaxWidth);
};
export default {