Unify single-track and multi-track paths in ConfigurableGraph - #49
Merged
Conversation
The single-track path (primary linePlot + addDataPoints()) was dead code: KinematicsGraphNode exclusively uses setTrackData() / clearAllTracks(), so the primary linePlot was always empty and addDataPoints() was never called from outside ConfigurableGraph. - Remove the primary LinePlot and its creation from ConfigurableGraph; the clippedDataContainer now only holds per-track plots from setTrackData() - Pass null for linePlot to the primary GraphDataManager, which now serves solely as a coordinator for tick spacing, axis reset, and the manuallyZoomed flag shared by gesture handlers - Make GraphDataManager.linePlot: LinePlot | null and guard the three setDataSet() call sites with optional chaining - Delete the dead public addDataPoints() and private getValueForAxis() methods No behaviour change: the primary linePlot rendered nothing (0 points), and the ZoomGestureHandler's getDataPointCount() > 1 branch was already unreachable because the primary manager was never populated. https://claude.ai/code/session_01JZLVYHZUundEnN8z2tM4mV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The single-track path (primary linePlot + addDataPoints()) was dead code:
KinematicsGraphNode exclusively uses setTrackData() / clearAllTracks(),
so the primary linePlot was always empty and addDataPoints() was never
called from outside ConfigurableGraph.
the clippedDataContainer now only holds per-track plots from setTrackData()
solely as a coordinator for tick spacing, axis reset, and the manuallyZoomed
flag shared by gesture handlers
setDataSet() call sites with optional chaining
No behaviour change: the primary linePlot rendered nothing (0 points),
and the ZoomGestureHandler's getDataPointCount() > 1 branch was already
unreachable because the primary manager was never populated.
https://claude.ai/code/session_01JZLVYHZUundEnN8z2tM4mV