Skip to content

Fix main: add src/zoom.ts (DMX slot watch keeps its drag zoom) - #95

Merged
larszu merged 1 commit into
mainfrom
fix/dmx-watch-keep-zoom
Nov 29, 2026
Merged

larszu merged 1 commit into
mainfrom
fix/dmx-watch-keep-zoom

Conversation

@larszu

@larszu larszu commented Nov 29, 2026

Copy link
Copy Markdown
Owner

#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

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
@larszu
larszu merged commit d4d33d5 into main Nov 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant