Don't redraw device views when you click on them

This commit is contained in:
sparks-alec
2023-10-01 01:40:32 -04:00
parent a004850dc7
commit f433a9983c
+6 -1
View File
@@ -183,7 +183,12 @@ function switchDevice(id) {
}
window.switchClass(document.getElementById(id), 'active-device');
drawDeviceFrame(id);
if (!DEVICE.all[id].drawn) {
// don't re-draw the whole device frame if it's already drawn
drawDeviceFrame(id);
}
window.switchClass(document.getElementById(`device-${id}`), 'active-device-outline');
document.getElementById('device-settings-table').style.display = 'block';