mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
FIX: percentage is not below kind
This commit is contained in:
parent
2b17bc728f
commit
2af2412e28
1 changed files with 2 additions and 1 deletions
|
@ -170,12 +170,13 @@ export function renderButtons(
|
|||
// Create a tspan for the text content (the "kind" part)
|
||||
const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||
tspan.textContent = current_text_element_content;
|
||||
tspan.setAttribute("dy", "0");
|
||||
tspan.setAttribute("dy", "0.5em");
|
||||
|
||||
// Create a tspan for the percentage
|
||||
const tspan2 = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||
tspan2.textContent = `\u200e(${totalCorrect(d).percent}%)`;
|
||||
tspan2.setAttribute("dy", "1em");
|
||||
tspan2.setAttribute("dx", "-4em"); // i realized it works. It's probably a coincidence and a hack
|
||||
|
||||
current_text_element.appendChild(tspan);
|
||||
current_text_element.appendChild(tspan2);
|
||||
|
|
Loading…
Reference in a new issue