From ce86e2afb83461ccff20101884c39aeb3ff3b109 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 4 Nov 2024 23:59:49 +0100 Subject: fix elector layout --- play.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index b0b1b7e..81988d9 100644 --- a/play.js +++ b/play.js @@ -1216,14 +1216,12 @@ function layout_elector(s, pow) { } function layout_electoral_college(ix, pow) { - for (let s of all_electoral_colleges) { - let e = ui.elector[pow][used_elector[pow]++] - let x = ELECTORAL_COLLEGE_X + ELECTORAL_COLLEGE_DX * ix - let y = ELECTORAL_COLLEGE_Y - e.style.left = (x - 16) + "px" - e.style.top = (y - 16) + "px" - ui.markers_element.appendChild(e) - } + let e = ui.elector[pow][used_elector[pow]++] + let x = ELECTORAL_COLLEGE_X + ELECTORAL_COLLEGE_DX * ix + let y = ELECTORAL_COLLEGE_Y + e.style.left = (x - 16) + "px" + e.style.top = (y - 16) + "px" + ui.markers_element.appendChild(e) } function update_favicon() { -- cgit v1.2.3