mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-14 09:44:51 +01:00
#3409 Fixed the truncated tags issue
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user