summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-10-23 22:22:35 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-30 13:26:51 +0100
commitb5382593b0a3ef645f4e935eeceda0c3203fcfcd (patch)
tree6b45620ee4a09da3f2196c05ab75747deea10e44 /play.js
parent09fb65e8e3840a1c64128fc01d00d7abecbbb8db (diff)
downloadcrusader-rex-b5382593b0a3ef645f4e935eeceda0c3203fcfcd.tar.gz
Fix bug with stacked layout.
Diffstat (limited to 'play.js')
-rw-r--r--play.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/play.js b/play.js
index 6929382..a9cddba 100644
--- a/play.js
+++ b/play.js
@@ -535,8 +535,8 @@ function layout_blocks_stacked(location, secret, known) {
function position_block_stacked(location, i, c, k, element) {
let space = TOWNS[location]
let block_size = 60+6
- let x = space.x + (i - c) * 16 + k * 12
- let y = space.y + (i - c) * 16 - k * 12
+ let x = space.layout.x + (i - c) * 16 + k * 12
+ let y = space.layout.y + (i - c) * 16 - k * 12
element.style.left = ((x - block_size/2)|0)+"px"
element.style.top = ((y - block_size/2)|0)+"px"
}