Removing random label for merge commits

This commit is contained in:
Knut Sveidqvist 2022-03-31 20:06:31 +02:00
parent bbac11a4b8
commit 3ccf027f42

View File

@ -181,6 +181,7 @@ const drawCommits = (svg, commits, modifyGraph) => {
if (modifyGraph) {
const px=4;
const py=2;
if(commit.type !== commitType.MERGE) {
const labelBkg = gLabels.insert('rect')
.attr('class', 'commit-label-bkg');
@ -190,7 +191,7 @@ const drawCommits = (svg, commits, modifyGraph) => {
.attr('class', 'commit-label')
.text(commit.id);
let bbox = text.node().getBBox();
console.log(bbox);
// Now we have the label, lets position the background
labelBkg
.attr('x', pos + 10 - bbox.width / 2 - py)
@ -198,6 +199,7 @@ const drawCommits = (svg, commits, modifyGraph) => {
.attr('width', bbox.width + 2 * py)
.attr('height', bbox.height + 2 * py);
text.attr('x', pos + 10 - bbox.width / 2);
}
if(commit.tag) {
const rect = gLabels.insert('polygon');
const hole = gLabels.append('circle');