Progress ring fills each segment with a sweep instead of redrawing
This commit is contained in:
+3
-3
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user