Fix unselecting selected record
This commit is contained in:
parent
5fa5320713
commit
17e6a7812f
6
index.js
6
index.js
@ -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');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user