diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-09-08 00:42:07 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-17 13:11:27 +0100 |
commit | 14446ca1064f9527d92fcc2bac7320c67e5ddb53 (patch) | |
tree | 79afb903bf3c4921926aefbed21cee8efcbb08ff | |
parent | b9ecf1b7125c080d228852320f6f6b0a06ba0b3e (diff) | |
download | rommel-in-the-desert-14446ca1064f9527d92fcc2bac7320c67e5ddb53.tar.gz |
Fix z-order fighting of adjacent axis and allied stacks.
-rw-r--r-- | play.js | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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 } |