Fix unselecting selected record

This commit is contained in:
Catalin Constantin Mititiuc 2025-06-16 22:41:28 -07:00
parent 5fa5320713
commit 17e6a7812f

View File

@ -709,8 +709,14 @@ POINTS.forEach((row, index) => row.forEach(([x, y]) => {
document.querySelectorAll('.soldier-record').forEach(el =>
el.addEventListener('click', e => {
if (el.classList.contains('selected')) {
el.classList.remove('selected');
RecordSheet.unSelect();
Counter.unSelect();
} else {
RecordSheet.select(el);
Counter.select(el);
}
let sl = svg.querySelector('.sight-line');