index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <webdevcat@proton.me> | 2024-07-28 11:52:22 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-07-28 11:52:22 -0700 |
commit | 165ae72ef203e65e8576bb233972d9548ec0e5f8 (patch) | |
tree | e75de6886c94dbf665505f1404fca01af5317faa /public | |
parent | 4a4efb894f0e227e1331aa4f3a47753ce749ed0d (diff) |
Handle clicks in grid-top cell
Diffstat (limited to 'public')
-rw-r--r-- | public/assets/css/map.css | 10 | ||||
-rw-r--r-- | public/assets/images/scenario_template.svg | 5 |
2 files changed, 8 insertions, 7 deletions
diff --git a/public/assets/css/map.css b/public/assets/css/map.css index 7e74efb..dfdc08b 100644 --- a/public/assets/css/map.css +++ b/public/assets/css/map.css @@ -265,9 +265,7 @@ g[data-y]:nth-child(odd) { transform: scale(var(--scale)); } -[data-x]:hover use[href="#hex"], -[data-q][data-r][data-s][data-t]:hover use[href="#hex"], -[data-q][data-r][data-s][data-t].hover use[href="#hex"] { +.grid-top:hover use[href="#hex"] { opacity: 1; fill: orange; stroke: black; @@ -512,21 +510,21 @@ g.counter use[class^="counter-"] { } [data-q][data-r][data-s][data-t] > use[class^="counter-"], -.grid-top > use[class^="counter-"] { +.grid-top .container > use[class^="counter-"] { --translateX: calc(var(--x) / 6 - 5px); --translateY: calc(var(--y) / 6 - 5px); } [data-q][data-r][data-s][data-t]:hover > g.counter ~ use[class^="counter-"], [data-q][data-r][data-s][data-t].hover > g.counter ~ use[class^="counter-"], -.grid-top > g.counter ~ use[class^="counter-"] { +.grid-top .container > g.counter ~ use[class^="counter-"] { --translateX: calc(var(--x) * 2 - 5px); --translateY: calc(var(--y) * 2 - 5px); } [data-q][data-r][data-s][data-t]:hover > use[class^="counter-"], [data-q][data-r][data-s][data-t].hover > use[class^="counter-"], -.grid-top > use[class^="counter-"] { +.grid-top .container > use[class^="counter-"] { --translateX: calc(var(--x) * 1.5 - 5px); --translateY: calc(var(--y) * 1.5 - 5px); } diff --git a/public/assets/images/scenario_template.svg b/public/assets/images/scenario_template.svg index ad7cba3..b6595f6 100644 --- a/public/assets/images/scenario_template.svg +++ b/public/assets/images/scenario_template.svg @@ -63,6 +63,9 @@ </g> <g class="grid"/> - <g class="grid-top"/> + <g class="grid-top"> + <use href="#hex"/> + <g class="container"/> + </g> </g> </svg> |