Fix preexisting prone counter not removing if unit end movement without moving
This commit is contained in:
parent
868ea94010
commit
78882ad311
@ -115,11 +115,13 @@ export function removeClones(svg, counter) {
|
||||
}
|
||||
|
||||
export function endMove(svg, counter) {
|
||||
const proneCounter = counter.querySelector('[href="#counter-prone"]');
|
||||
|
||||
if (proneCounter) {
|
||||
proneCounter.dataset.preexisting = '';
|
||||
}
|
||||
Array.from(counter.children).forEach(n => {
|
||||
if (n.classList.contains('removed')) {
|
||||
n.remove();
|
||||
} else {
|
||||
n.dataset.preexisting = '';
|
||||
}
|
||||
});
|
||||
|
||||
svg.querySelector(traceSelector(counter))?.remove();
|
||||
delete counter.dataset.previous;
|
||||
|
Loading…
x
Reference in New Issue
Block a user