Remove ghost node deletion from kill handlers (k/K keys)
This commit is contained in:
parent
9c84ed7a09
commit
f77d680609
|
|
@ -1695,7 +1695,7 @@
|
|||
updateDeleteButton();
|
||||
} else if (e.key === "k") {
|
||||
// Soft kill - send 20 Hz to stop voices gently
|
||||
const sirenIp = document.getElementById('sirenIp').value || "192.168.4.200";
|
||||
const sirenIp = document.getElementById("sirenIp").value || "192.168.4.200";
|
||||
fetch('/api/kill-siren', {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
|
|
@ -1707,15 +1707,12 @@
|
|||
n.removeData('sirenActive');
|
||||
n.removeData('borderColor');
|
||||
});
|
||||
// Remove all ghost nodes
|
||||
const ghosts = cy.nodes().filter(n => n.data('isGhost') === 'true');
|
||||
ghosts.remove();
|
||||
}).catch(err => {
|
||||
console.log('Error sending kill:', err);
|
||||
});
|
||||
} else if (e.key === "K") {
|
||||
// Hard kill - send 0 Hz to stop voices immediately
|
||||
const sirenIp = document.getElementById('sirenIp').value || "192.168.4.200";
|
||||
const sirenIp = document.getElementById("sirenIp").value || "192.168.4.200";
|
||||
fetch('/api/kill-siren', {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
|
|
@ -1727,18 +1724,9 @@
|
|||
n.removeData('sirenActive');
|
||||
n.removeData('borderColor');
|
||||
});
|
||||
// Remove all ghost nodes
|
||||
const ghosts = cy.nodes().filter(n => n.data('isGhost') === 'true');
|
||||
ghosts.remove();
|
||||
cy.nodes().forEach(n => {
|
||||
n.removeData('sirenActive');
|
||||
n.removeData('borderColor');
|
||||
});
|
||||
}).catch(err => {
|
||||
console.log('Error sending kill:', err);
|
||||
});
|
||||
} else if (e.key === "f" || e.key === "F") {
|
||||
toggleDisplayUnit();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue