summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
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
}
}