From 9e16306c615dc8e96aed5258badf1b9ab68a6379 Mon Sep 17 00:00:00 2001 From: "D. Scott Boggs" Date: Tue, 20 Jun 2023 11:48:02 -0400 Subject: [PATCH] Remove a bit of cruft --- client/src/state.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/client/src/state.ts b/client/src/state.ts index e0ad4ad..d9c00e7 100644 --- a/client/src/state.ts +++ b/client/src/state.ts @@ -18,12 +18,6 @@ export const state = reactive({ source.addEventListener('TickAdded', event => { console.log(event) const tick: Tick = JSON.parse(event.data) - // for (const track of this.tracks) { - // if (track.id === tick.track_id) { - // console.debug('pushing tick') - // track.ticks?.push(tick) - // } - // } const tracks = this.tracks.map(track => { if (track.id === tick.track_id) { const ticks = track.ticks ?? [] @@ -33,22 +27,17 @@ export const state = reactive({ } return track }) - console.debug(tracks) this.tracks = tracks }) source.addEventListener('TickDropped', event => { console.log(event) const tick: Tick = JSON.parse(event.data) - // for (const track of this.tracks) - // if (track.id === tick.track_id) - // track.ticks = track.ticks?.filter($tick => $tick.id === tick.id) const tracks = this.tracks.map(track => { if (track.id === tick.track_id) { track.ticks = track.ticks?.filter($tick => $tick.id !== tick.id) } return track }) - console.debug(tracks) this.tracks = tracks }) source.addEventListener('Lagged', event => {