This commit is contained in:
Sidharth Vinod 2023-06-09 17:03:02 +05:30
parent 3f080e5bc8
commit b3ce56c7fc
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD

View File

@ -109,9 +109,6 @@ function createFormattedText(width, g, structuredText, addBackground = false) {
const labelGroup = g.append('g'); const labelGroup = g.append('g');
let bkg = labelGroup.insert('rect').attr('class', 'background'); let bkg = labelGroup.insert('rect').attr('class', 'background');
const textElement = labelGroup.append('text').attr('y', '-10.1'); const textElement = labelGroup.append('text').attr('y', '-10.1');
// .attr('dominant-baseline', 'middle')
// .attr('text-anchor', 'middle');
// .attr('text-anchor', 'middle');
let lineIndex = 0; let lineIndex = 0;
structuredText.forEach((line) => { structuredText.forEach((line) => {
/** /**
@ -139,7 +136,6 @@ function createFormattedText(width, g, structuredText, addBackground = false) {
.attr('y', -padding) .attr('y', -padding)
.attr('width', bbox.width + 2 * padding) .attr('width', bbox.width + 2 * padding)
.attr('height', bbox.height + 2 * padding); .attr('height', bbox.height + 2 * padding);
// .style('fill', 'red');
return labelGroup.node(); return labelGroup.node();
} else { } else {