From c1e30e3e17e20138de0b70a77c9b8115dcb4b206 Mon Sep 17 00:00:00 2001 From: rakadu1 Date: Fri, 14 Nov 2025 15:50:32 +0530 Subject: [PATCH] Debug overlays fixed. --- steps/src/dom.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/steps/src/dom.js b/steps/src/dom.js index d8215a4..6cc9a21 100644 --- a/steps/src/dom.js +++ b/steps/src/dom.js @@ -195,7 +195,7 @@ export function updateDebugOverlay(currentMediaTime) { const driftColor = Math.abs(driftMs) > 50 ? "#FF6347" : "#98FB98"; // Tomato red or Pale green content.push(`Video Time (s): ${currentMediaTime.toFixed(3)}`); // Display current video time - content.push(`Target Radar Time (ms): ${targetRadarTimeMs.toFixed(0)}`); + content.push(`Target Sync Time (s): ${currentRadarFrame.videoSyncedTime.toFixed(3)}`); content.push(`Drift (ms): ${driftMs.toFixed(0)}`); content.push(`Video Start Time: ${appState.videoStartDate.toISOString()}`); content.push(`Radar Start Time: ${new Date(appState.radarStartTimeMs).toISOString()}`); @@ -226,24 +226,19 @@ function getCurrentColorMode() { } export function updatePersistentOverlays(currentMediaTime) { - // If we don't have the necessary data, hide the overlays and exit. - const isDebug1Visible = toggleDebugOverlay.checked; - const isDebug2Visible = toggleDebug2Overlay.checked; - - if (!appState.vizData || !appState.videoStartDate) { + // If the advanced debug overlay is visible, hide the persistent overlays and exit. + if (toggleDebug2Overlay.checked) { radarInfoOverlay.classList.add("hidden"); videoInfoOverlay.classList.add("hidden"); return; } - if (isDebug1Visible && isDebug2Visible) { + + // If we don't have the necessary data, hide the overlays and exit. + if (!appState.vizData || !appState.videoStartDate) { radarInfoOverlay.classList.add("hidden"); videoInfoOverlay.classList.add("hidden"); return; } - if(isDebug1Visible || isDebug2Visible){ - videoInfoOverlay.classList.add("hidden"); - return; - } // Otherwise, make sure they are visible. radarInfoOverlay.classList.remove("hidden"); videoInfoOverlay.classList.remove("hidden");