summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-06-21 21:18:28 +0200
committerTor Andersson <tor@ccxvii.net>2023-07-07 18:39:37 +0200
commit78eb830571c26ebbfbcb8bc0608b11db868aeb90 (patch)
tree48b672dd6125849e851ed21e71d3d69ff7fe5292 /play.js
parentd8aa3a523ce28ec3e3e616ad2c090bd3f4f835fa (diff)
downloadtime-of-crisis-78eb830571c26ebbfbcb8bc0608b11db868aeb90.tar.gz
Praetorian Guard.
Diffstat (limited to 'play.js')
-rw-r--r--play.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/play.js b/play.js
index 18550e4..09e9217 100644
--- a/play.js
+++ b/play.js
@@ -747,11 +747,13 @@ function layout_available(list, dx, x0, y0) {
let y = 1650 + 45 - y0
let x = 25 + x0
for (let item of list) {
- item.style.left = x + "px"
+ let xo = item.my_id % 6
+ if (list.length < 6)
+ xo -= 1
+ item.style.left = (x + xo * dx) + "px"
item.style.top = y + "px"
item.style.zIndex = 1
item.my_stack = 0
- x += dx
}
}