diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-12-20 17:03:04 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-17 12:53:18 +0100 |
commit | 5b88b82e18ed8810c2cec9611cea200fe71eed85 (patch) | |
tree | 4e87bbec77be794a45c011c6f255db8098cec4d3 | |
parent | 426a3b5ef8ff9f7e754abe00955593c8f9930867 (diff) | |
download | hammer-of-the-scots-5b88b82e18ed8810c2cec9611cea200fe71eed85.tar.gz |
Use ID instead of class for map and mapwrap.
-rw-r--r-- | play.html | 26 | ||||
-rw-r--r-- | ui.js | 8 |
2 files changed, 17 insertions, 17 deletions
@@ -73,44 +73,44 @@ /* MAP */ -.mapwrap { +#mapwrap { position: relative; box-shadow: 0px 1px 10px rgba(0,0,0,0.5); width: 1688px; height: 1950px; } -.map { +#map { position: absolute; background-color: darkslategray; width: 1688px; height: 1950px; } -.map svg { +#map svg { position: absolute; } -.map svg image { +#map svg image { pointer-events: none; } -.map svg path.area { +#map svg path.area { opacity: 0; fill-opacity: 0.4; fill: white; } -.map svg path.area.where { +#map svg path.area.where { opacity: 1; fill: darkslategray; } -.map svg path.area.highlight { +#map svg path.area.highlight { cursor: pointer; opacity: 1; fill: white; } -.map.hide_blocks div.blocks { +#map.hide_blocks div.blocks { visibility: hidden; } @@ -160,7 +160,7 @@ body.shift .block.known:hover { .oldblocks div.block { border-radius: 8px; } .newblocks div.block { border-radius: 4px; } -.map div.block { +#map div.block { position: absolute; } @@ -413,8 +413,8 @@ div.block { <div id="grid_center"> -<div id="mapwrap" class="mapwrap"> -<div id="map" class="map"> +<div id="mapwrap"> +<div id="map"> <svg id="svgmap" width="1688px" height="1950px" viewBox="0 0 1688 1950"> <g id="areas" transform="translate(0,1950) scale(0.1,-0.1)"> @@ -886,8 +886,8 @@ c50 53 55 80 28 143 -18 42 -21 62 -16 107 17 147 18 179 6 245 -15 91 -56 </svg> <div id="turn" class="turn year_1297"></div> -<div id="blocks" class="blocks"></div> -<div id="offmap" class="offmap" style="visibility:hidden"></div> +<div id="blocks"></div> +<div id="offmap" style="visibility:hidden"></div> </div> </div> @@ -647,13 +647,13 @@ function update_cards() { } if (!game.e_card) - document.querySelector("#england_card").className = "small_card card_back"; + document.getElementById("england_card").className = "small_card card_back"; else - document.querySelector("#england_card").className = "small_card " + CARDS[game.e_card].image; + document.getElementById("england_card").className = "small_card " + CARDS[game.e_card].image; if (!game.s_card) - document.querySelector("#scotland_card").className = "small_card card_back"; + document.getElementById("scotland_card").className = "small_card card_back"; else - document.querySelector("#scotland_card").className = "small_card " + CARDS[game.s_card].image; + document.getElementById("scotland_card").className = "small_card " + CARDS[game.s_card].image; } function update_battle() { |