mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-31 11:59:10 +00:00
a8be8ee97c
The scroll position was a pixel offset into a document that changes while it is being read. Growing an event above the reader left scrollTop where it was, so the text under the reading line slid: measured going from "Lucas Bennett" to "Lunch" on an unchanged offset of 900. Hold the position as a place in the script instead — the block under the reading line plus an offset into it — and re-resolve it to pixels whenever the document is measured. This follows how professional prompters cue a story plus an offset rather than a scroll offset, so a reorder carries the reader with the block and an edit above them changes nothing. A deleted block falls back to the end of the nearest surviving event before it. Add event-to-event stepping on Shift with the vertical arrows, matching Shift being the coarser step on the horizontal ones, and take the step from where the scroll is headed so pressing again mid-ease moves on rather than re-aiming at the same event. Free scrolling and the existing nudge and page keys are unchanged, but they now hand over the scroll by one rule: how far the reader moved the script themselves, accumulated. Distance from the follow target could not tell a catch-up still running from a reader who had moved, so touching the wheel while the prompter eased towards a newly loaded event stopped it following. Accumulating also measures a wheel gesture the browser spreads over many frames, which the old per-event check sampled only once. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cb8RVPNQ2ETPJxdy4b8CHf