Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/assets/css/map.css19
-rw-r--r--src/modules/gameboard.js2
2 files changed, 8 insertions, 13 deletions
diff --git a/public/assets/css/map.css b/public/assets/css/map.css
index dfdc08b..7d7de6f 100644
--- a/public/assets/css/map.css
+++ b/public/assets/css/map.css
@@ -265,12 +265,6 @@ g[data-y]:nth-child(odd) {
transform: scale(var(--scale));
}
-.grid-top:hover use[href="#hex"] {
- opacity: 1;
- fill: orange;
- stroke: black;
-}
-
/*[data-q][data-r][data-s][data-t] g.counter,*/
/*[data-q][data-r][data-s][data-t] g.counter .troop-number,*/
/*[data-q][data-r][data-s][data-t] g.counter .squad-number {*/
@@ -498,6 +492,12 @@ text.elevation {
fill: black;
}
+.grid-top:hover use[href="#hex"] {
+ opacity: 1;
+ fill: orange;
+ stroke: black;
+}
+
use[class^="counter-"] {
transform: scale(var(--scale)) translate(var(--translateX), var(--translateY));
transition: transform 0.25s;
@@ -509,21 +509,16 @@ g.counter use[class^="counter-"] {
--translateY: var(--y);
}
-[data-q][data-r][data-s][data-t] > use[class^="counter-"],
-.grid-top .container > use[class^="counter-"] {
+[data-q][data-r][data-s][data-t] > 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 .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 .container > use[class^="counter-"] {
--translateX: calc(var(--x) * 1.5 - 5px);
--translateY: calc(var(--y) * 1.5 - 5px);
diff --git a/src/modules/gameboard.js b/src/modules/gameboard.js
index 26e6c44..5851273 100644
--- a/src/modules/gameboard.js
+++ b/src/modules/gameboard.js
@@ -248,7 +248,7 @@ export function start(el) {
} else if (toPlace && !occupant) {
//soldier.place(svg, toPlace, this);
top.collection.set(toPlace, { parent: top.cell });
- top.container.append(toPlace);
+ top.container.prepend(toPlace);
//toPlace.removeEventListener('click', selectOffBoard);
placing.push(toPlace);
//getLockedSightLine(svg) ? updateSightLine(this) : clearSightLine();