mirror of
https://github.com/stagehacks/Cue-View.git
synced 2026-08-06 06:13:40 +00:00
again, don't redraw device views clicked
This should be a more robust fix.
This commit is contained in:
+8
-1
@@ -21,6 +21,10 @@ function drawDeviceFrame(id) {
|
||||
|
||||
const d = DEVICE.all[id];
|
||||
|
||||
if (d.frameDrawn) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const str = `
|
||||
<html>
|
||||
<head>
|
||||
@@ -56,6 +60,8 @@ function drawDeviceFrame(id) {
|
||||
$devicePinned.style.display = 'none';
|
||||
}
|
||||
|
||||
d.frameDrawn = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -143,8 +149,9 @@ module.exports.removeDeviceFromList = function removeDeviceFromList(device) {
|
||||
};
|
||||
|
||||
function switchDevice(id) {
|
||||
if (activeDevice && activeDevice.pinIndex === false) {
|
||||
if (activeDevice && activeDevice.pinIndex === false && activeDevice.id !== id) {
|
||||
document.getElementById(`device-${activeDevice.id}`).remove();
|
||||
activeDevice.frameDrawn = false;
|
||||
activeDevice = false;
|
||||
}
|
||||
activeDevice = DEVICE.all[id];
|
||||
|
||||
Reference in New Issue
Block a user