From de5f3c266677590d63fda98f25085b4327710def Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Mon, 25 Mar 2024 12:54:27 -0700
Subject: Clean up some styles
---
index.js | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
(limited to 'index.js')
diff --git a/index.js b/index.js
index dfff1a3..deef03b 100644
--- a/index.js
+++ b/index.js
@@ -300,15 +300,13 @@ map.addEventListener('mousemove', e => {
document.querySelectorAll('.soldier-record').forEach(el =>
el.addEventListener('click', e => {
- if (e.target.tagName !== 'INPUT' && e.target.tagName !== 'LABEL') {
- if (el.classList.contains('selected')) {
- el.classList.remove('selected');
- } else {
- document.querySelectorAll('.soldier-record.selected').forEach(el =>
- el.classList.remove('selected')
- );
- el.classList.add('selected');
- }
+ if (el.classList.contains('selected')) {
+ el.classList.remove('selected');
+ } else {
+ document.querySelectorAll('.soldier-record.selected').forEach(el =>
+ el.classList.remove('selected')
+ );
+ el.classList.add('selected');
}
})
);
--
cgit v1.2.3