Progress ring fills each segment with a sweep instead of redrawing

This commit is contained in:
2026-08-16 22:44:02 +01:00
parent 13d42db0a3
commit aac778ceba
3 changed files with 48 additions and 15 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
import { $, h, api, pollId, liveSocket, resultsView, toast, ring, icon } from "./common.js";
import { $, h, api, pollId, liveSocket, resultsView, toast, paintRing, icon } from "./common.js";
import { makeRingScanner } from "./ringscan.js";
const pid = pollId();
@@ -36,7 +36,7 @@ function lsSet(k, v) { try { localStorage.setItem(k, v); } catch { /* private mo
function renderDots(n) {
const box = $("#dots");
box.replaceChildren(ring(n, required, 150));
paintRing(box, n, required, 150);
box.setAttribute("aria-label", `${n} codes lus sur ${required}`);
}
@@ -327,7 +327,7 @@ async function confirmVote(q) {
function collectPresence(n) {
const dlg = $("#presence");
const got = [];
const paint = () => $("#p-ring").replaceChildren(ring(got.length, n, 120));
const paint = () => paintRing($("#p-ring"), got.length, n, 120);
paint();
$("#p-msg").textContent = "";
dlg.showModal();