From 205f40726661d6e578ebf65f81137f309e69fb36 Mon Sep 17 00:00:00 2001 From: sparks-alec Date: Sun, 8 Jan 2023 23:51:55 -0500 Subject: [PATCH] clicking on a device column makes it the active the device --- src/assets/css/index.css | 1 + src/view.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/assets/css/index.css b/src/assets/css/index.css index 9ab1a51..52f72d6 100644 --- a/src/assets/css/index.css +++ b/src/assets/css/index.css @@ -207,6 +207,7 @@ a { width: 100%; height: 100%; border: 0; + pointer-events: none; } .active-device-outline { padding: 0px; diff --git a/src/view.js b/src/view.js index 9707a2c..39cb874 100644 --- a/src/view.js +++ b/src/view.js @@ -168,6 +168,9 @@ function switchDevice(id) { document.getElementById('all-devices').insertAdjacentHTML('afterbegin', html); $deviceWrapper = document.getElementById(`device-${i}`); + $deviceWrapper.onclick = function (e) { + switchDevice(i); + }; } window.switchClass(document.getElementById(id), 'active-device');