From b5382593b0a3ef645f4e935eeceda0c3203fcfcd Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 23 Oct 2022 22:22:35 +0200 Subject: Fix bug with stacked layout. --- play.js | 4 ++-- 1 file 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" } -- cgit v1.2.3