summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorteisuru <31881306+teisuru@users.noreply.github.com>2023-08-27 14:20:15 +0200
committerTor Andersson <tor@ccxvii.net>2023-12-10 18:16:55 +0100
commit334806029f81684611bd0c5d52445b0981cab691 (patch)
treebda5cbcd7efc2e04d12a2e4aee5dea5683315209 /play.js
parent71b35aab731eea9999a4b4081172ee9f274ebd9f (diff)
downloadplantagenet-334806029f81684611bd0c5d52445b0981cab691.tar.gz
lord seats
Diffstat (limited to 'play.js')
-rw-r--r--play.js36
1 files changed, 20 insertions, 16 deletions
diff --git a/play.js b/play.js
index 6dc77f0..85bc07b 100644
--- a/play.js
+++ b/play.js
@@ -522,6 +522,7 @@ const ui = {
cards: [],
calendar: [],
track: [],
+ seat: [],
plan_panel: document.getElementById("plan_panel"),
plan: document.getElementById("plan"),
@@ -700,27 +701,30 @@ function build_map() {
e.style.border = "2px solid aqua"
e.style.backgroundSize = small + "px"
document.getElementById("pieces").appendChild(e)
-
-
- /*
- if (locale.name == London) {
- if {data.lords ==
- e = ui.locale_markers[ix] = document.createElement("div")
- e.className = "locale marker seat " + locale.name // Depleted to be removed - depleted/exhausted to add markers
- e.style.top = y+h-small-offsetdeplete + "px"
- e.style.left = offsetdeplete+x+ (w-small)/2 + "px"
- e.style.width = small + "px"
- e.style.height = small + "px"
- e.style.border = "2px solid aqua"
- e.style.backgroundSize = small + "px"
- document.getElementById("pieces").appendChild(e)
- } */
})
+// Lord seats
+ data.seat.forEach((seat, ix) => {
+ let e = ui.seat[ix] = document.createElement("div")
+ let { x, y, w, h } = seat.box
+ let xc = Math.round(x + w / 2)
+ let yc = Math.round(y + h / 2)
+ let small = 54
+ locale_xy[ix] = [ xc, yc ]
-
+ e.className = seat.name
+ e.style.position = "absolute"
+ e.style.top = y + "px"
+ e.style.left = x + "px"
+ e.style.width = w + "px"
+ e.style.height = h + "px"
+ e.style.border = "1px solid black"
+ e.style.backgroundSize = small + "px"
+ e.style.backgroundColor = "red"
+ document.getElementById("pieces").appendChild(e)
+ })
data.lords.forEach((lord, ix) => {