Repository navigation
Fix main: add src/zoom.ts (DMX slot watch keeps its drag zoom) - #95
Merged
Merged
Conversation
uPlot's setData resets every scale by default, so each new packet set threw away the user's x zoom on the live watch chart. Plot gets keepZoom: while x is zoomed inside the data the window is held; unzoomed or after a double-click it follows the data again. Found on the ZT703S with OpenOSC 0.21.19. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012p9w1YRZ9ddomxdA5eZWvJ
This was referenced Nov 29, 2026
Closed
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.
#92 swept my uncommitted working-tree change (Plot.tsx keepZoom, DmxWatch keepZoom, check-logic xZoomed checks) into main without the new file `src/zoom.ts`, so main does not build. This PR adds the missing file, which completes the change instead of reverting it. #94 reverts only Plot.tsx and would still leave DmxWatch passing `keepZoom` and check-logic importing `../src/zoom.ts`, so it cannot go green on its own; close #94 if this one merges.
The change itself (found while verifying #84 on the ZT703S, OpenOSC 0.21.19): uPlot `setData(data)` resets every scale, so each packet update threw away a drag zoom on the slot-watch chart. `Plot` now takes `keepZoom`: while x is zoomed inside the data, `setData(data, false)` keeps the window; unzoomed or after a double-click x follows the data again. Pure `xZoomed` in `src/zoom.ts`, 4 checks.
Checked in the app with the device connected: zoomed to packets 6–15, appended 3 packets, window held and the canvas element stayed the same (no rebuild); after a double-click, the next packet set x to 0–43.
🤖 Generated with Claude Code