FIX: incorrect alignment

This commit is contained in:
GithubAnon0000 2025-04-27 18:51:10 +02:00
parent 0b7140504e
commit 2e0b0b9563

View file

@ -172,7 +172,7 @@ export function renderButtons(
const tspan2 = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); const tspan2 = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
tspan2.textContent = `\u200e(${totalCorrect(d).percent}%)`; tspan2.textContent = `\u200e(${totalCorrect(d).percent}%)`;
tspan2.setAttribute("dy", "1em"); tspan2.setAttribute("dy", "1em");
tspan2.setAttribute("dx", "-4em"); // i realized it works. It's probably a coincidence and a hack tspan2.setAttribute("x", "0");
this.appendChild(tspan); this.appendChild(tspan);
this.appendChild(tspan2); this.appendChild(tspan2);