From e844b2d6d247f4e0a1e4d93b0d972735b64937ae Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Sat, 2 Dec 2023 15:07:26 +0100 Subject: ensure state labels wont be covered by cubes/V/X --- play.html | 98 +++++++++++++++++++++++++++++++-------------------------------- play.js | 98 +++++++++++++++++++++++++++++++-------------------------------- 2 files changed, 98 insertions(+), 98 deletions(-) diff --git a/play.html b/play.html index e3ea4f0..0aef420 100644 --- a/play.html +++ b/play.html @@ -1099,55 +1099,55 @@ c5 3 13 7 17 8 8 2 9 3 11 12 1 5 5 12 8 16 5 8 5 8 3 22 l-3 14 -30 -1 c-35
-
NJ
-
CT
-
RI
-
MA
-
NH
-
VT
-
DE
-
MD
- -
ME
-
NY
-
NC
-
VA
-
PA
-
WV
-
KY
-
TN
-
OH
-
IN
-
IL
-
MI
-
WI
-
MO
-
IA
-
MN
-
FL
-
SC
-
GA
-
AL
-
MS
-
LA
-
AR
-
TX
-
OK
-
KS
-
NE
-
SD
-
ND
-
CO
-
WY
-
MT
-
NM
-
AZ
-
UT
-
NV
-
ID
-
CA
-
OR
-
WA
+
NJ
+
CT
+
RI
+
MA
+
NH
+
VT
+
DE
+
MD
+ +
ME
+
NY
+
NC
+
VA
+
PA
+
WV
+
KY
+
TN
+
OH
+
IN
+
IL
+
MI
+
WI
+
MO
+
IA
+
MN
+
FL
+
SC
+
GA
+
AL
+
MS
+
LA
+
AR
+
TX
+
OK
+
KS
+
NE
+
SD
+
ND
+
CO
+
WY
+
MT
+
NM
+
AZ
+
UT
+
NV
+
ID
+
CA
+
OR
+
WA
diff --git a/play.js b/play.js index bd2e9b2..0477fbc 100644 --- a/play.js +++ b/play.js @@ -58,54 +58,54 @@ const LAYOUT = { "South": [574, 505], "Plains": [406, 236], "West": [127, 300], - "NJ": [960, 277], - "CT": [1019, 237], - "RI": [1036, 165], - "MA": [1014, 74], - "ME": [963, 119], - "NH": [889, 96], - "VT": [817, 157], - "NY": [863, 207], - "DE": [997, 345], - "MD": [952, 404], - "NC": [864, 385], - "VA": [861, 332], - "PA": [849, 257], - "WV": [811, 314], - "KY": [743, 351], - "TN": [716, 401], - "OH": [762, 287], + "NJ": [960, 267], + "CT": [1019, 227], + "RI": [1036, 155], + "MA": [1014, 64], + "ME": [963, 109], + "NH": [889, 86], + "VT": [817, 147], + "NY": [863, 191], + "DE": [997, 335], + "MD": [952, 394], + "NC": [864, 375], + "VA": [861, 322], + "PA": [849, 247], + "WV": [811, 300], + "KY": [743, 341], + "TN": [716, 391], + "OH": [762, 277], "IN": [708, 285], - "IL": [663, 333], - "MI": [724, 228], - "WI": [639, 198], - "MO": [601, 357], - "IA": [563, 256], - "MN": [561, 163], - "FL": [835, 572], - "SC": [828, 433], - "GA": [779, 465], - "AL": [715, 470], - "MS": [662, 477], - "LA": [623, 544], - "AR": [605, 436], - "TX": [482, 516], - "OK": [519, 417], - "KS": [497, 348], - "NE": [477, 273], - "SD": [471, 205], - "ND": [468, 134], - "CO": [374, 331], - "WY": [341, 229], - "MT": [335, 133], - "NM": [351, 440], - "AZ": [245, 432], - "UT": [264, 310], - "NV": [180, 290], - "ID": [233, 203], - "CA": [126, 367], - "OR": [135, 173], - "WA": [158, 97], + "IL": [663, 323], + "MI": [724, 214], + "WI": [639, 188], + "MO": [601, 347], + "IA": [563, 246], + "MN": [561, 153], + "FL": [835, 562], + "SC": [828, 423], + "GA": [779, 455], + "AL": [715, 460], + "MS": [662, 467], + "LA": [623, 534], + "AR": [605, 426], + "TX": [482, 506], + "OK": [519, 407], + "KS": [497, 338], + "NE": [477, 263], + "SD": [471, 195], + "ND": [468, 124], + "CO": [374, 321], + "WY": [341, 219], + "MT": [335, 123], + "NM": [351, 430], + "AZ": [245, 422], + "UT": [264, 300], + "NV": [190, 278], + "ID": [233, 193], + "CA": [126, 357], + "OR": [135, 163], + "WA": [158, 87], } const US_STATES_LAYOUT = [ null ] @@ -714,8 +714,8 @@ function on_update() { // eslint-disable-line no-unused-vars if (campaigner_region) { pieces.append(ui.campaigners[i]) let [x, y] = REGIONS_LAYOUT[campaigner_region] - ui.campaigners[i].style.left = x - 30 + (15 * (i % 4)) + "px" - ui.campaigners[i].style.top = y - 40 + (30 * Math.floor(i / 4)) + "px" + ui.campaigners[i].style.left = x - 40 + (15 * (i % 4)) + (15 * Math.floor(i / 4)) + "px" + ui.campaigners[i].style.top = y - 35 + (20 * Math.floor(i / 4)) + "px" ui.campaigners[i].classList.toggle("action", is_campaigner_action(1 + i)) ui.campaigners[i].classList.toggle("selected", 1 + i === view.selected_campaigner) } -- cgit v1.2.3