From 33cf2cd3113bf8766af315ef219a7383fcc99087 Mon Sep 17 00:00:00 2001 From: Sandy Currier Date: Thu, 29 Feb 2024 13:20:32 -0500 Subject: [PATCH] cleaning up some kerning issues --- voting.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/voting.html b/voting.html index 139bc86..b068678 100644 --- a/voting.html +++ b/voting.html @@ -190,9 +190,9 @@

Your RCV selection:

if (thisContestValue.contest_type == "ticket") { newItem.innerHTML = "

Candidates:

"; } else if (thisContestValue.contest_type == "question") { - newItem.innerHTML = "

Your selection:

"; + newItem.innerHTML = "

Your selection:

"; } else { - newItem.innerHTML = "

Candidates:

"; + newItem.innerHTML = "

Candidates:

"; } const newList = document.createElement("ul"); newList.setAttribute("id", "choiceList"); @@ -222,10 +222,10 @@

Your RCV selection:

const textElement = document.createElement("span"); // Ugh - need to inspect for the choices data type if (choice.name) { - textElement.textContent = choice.name; + textElement.innerHTML = "  " + choice.name; } else { // Just an array of strings - textElement.textContent = choice; + textElement.innerHTML = "  " + choice; } if (thisContestValue.contest_type == "ticket") { // Note - need to add this as an additional flex-box @@ -234,7 +234,7 @@

Your RCV selection:

for (let office of thisContestValue.ticket_offices) { addendum.push(office + ":" + choice.ticket_names); } - textElement.textContent += "[" + addendum.join(", ") + "]"; + textElement.innerHTML += "  [" + addendum.join(", ") + "]"; } // Add the unselected class newItem.classList.add("unselected"); @@ -330,7 +330,7 @@

Your RCV selection:

// add an event listener to the button newButton.addEventListener("click", function (e) { console.log("Running RCV eventListener:"); - let itemName = e.target.parentNode.textContent.trim().replace(/ remove$/, ""); + let itemName = e.target.parentNode.textContent.trim().replace(/\sremove$/, ""); console.log("removing:", itemName); // remove it from sortableList e.target.parentNode.remove(); @@ -352,7 +352,7 @@

Your RCV selection:

// Create the text element const textElement = document.createElement("span"); - textElement.textContent = selectedText + " "; + textElement.innerHTML = selectedText + "  "; // Append everything ... newItem.appendChild(svgIcon);