From f77d68060933c884c2e78b6b857c101d1801d5a2 Mon Sep 17 00:00:00 2001 From: Michael Winter Date: Tue, 21 Apr 2026 17:09:34 +0200 Subject: [PATCH] Remove ghost node deletion from kill handlers (k/K keys) --- webapp/path_navigator.html | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/webapp/path_navigator.html b/webapp/path_navigator.html index d7948a0..a3e5945 100644 --- a/webapp/path_navigator.html +++ b/webapp/path_navigator.html @@ -1693,9 +1693,9 @@ deleteMode = !deleteMode; console.log('Delete mode:', deleteMode); updateDeleteButton(); - } else if (e.key === "k") { +} 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") { +} 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(); } });