From 14446ca1064f9527d92fcc2bac7320c67e5ddb53 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 8 Sep 2022 00:42:07 +0200 Subject: Fix z-order fighting of adjacent axis and allied stacks. --- play.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/play.js b/play.js index 64cdc30..8eb6983 100644 --- a/play.js +++ b/play.js @@ -708,10 +708,10 @@ function layout_stack(stack, hex, start_x, start_y, wrap, xdir) { x = start_x - 35 + i * 3 y = start_y - 35 + i * 3 } - if (is_unit_revealed(u)) - z = 1 + i + if (is_axis_unit(u)) + z = 100 + i else - z = 1 + i + z = i } e.style.top = y + "px" @@ -827,7 +827,6 @@ function update_map() { let this_y = start_y if (stack_list[hex][aa] === ui.focus) { let height = Math.min(wrap, stack_list[hex][aa].length) * 56 - console.log("stack", hex, aa, wrap, stack_list[hex][aa].length, height, this_y + height + 25) if (this_y + height + 25 > 960) this_y = 960 - height - 25 } -- cgit v1.2.3