From df3e8e300004009f3b418df14deda7353f9994ed Mon Sep 17 00:00:00 2001 From: rakadu1 Date: Tue, 9 Sep 2025 17:38:07 +0530 Subject: [PATCH] Un-Commented out the logic for drawing confirmed only. --- steps/src/drawUtils.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/steps/src/drawUtils.js b/steps/src/drawUtils.js index f6934de..c8b26a0 100644 --- a/steps/src/drawUtils.js +++ b/steps/src/drawUtils.js @@ -278,11 +278,11 @@ export function drawTrajectories(p, plotScales) { const localTtcColors = ttcColors(p); for (const track of appState.vizData.tracks) { - // if (toggleConfirmedOnly.checked && track.isConfirmed === false) { - // continue; - // } + if (toggleConfirmedOnly.checked && track.isConfirmed === false) { + continue; + } if (!track || !track.historyLog || !Array.isArray(track.historyLog)) { - const trackId = track ? track.id : 'Unknown ID'; + const trackId = track ? track.id : "Unknown ID"; console.warn( `Skipping malformed track in frame ${appState.currentFrame}. Track ID: ${trackId}`, track // We also log the entire track object for detailed inspection. @@ -413,9 +413,9 @@ export function drawTrackMarkers(p, plotScales) { for (const track of appState.vizData.tracks) { // --- START: Add the Same Safeguard Here --- // This robust check ensures the track and its historyLog are valid before use. - // if (toggleConfirmedOnly.checked && track.isConfirmed === false) { - // continue; - // } + if (toggleConfirmedOnly.checked && track.isConfirmed === false) { + continue; + } if (!track || !track.historyLog || !Array.isArray(track.historyLog)) { // We don't need to log a warning here again, as drawTrajectories already did. // We can just safely skip this malformed track.