From 78eb830571c26ebbfbcb8bc0608b11db868aeb90 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 21 Jun 2023 21:18:28 +0200 Subject: Praetorian Guard. --- play.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'play.js') 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 } } -- cgit v1.2.3