summaryrefslogtreecommitdiff
path: root/src/audio/miniaudio_backend.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-05 21:41:37 +0100
committerskal <pascal.massimino@gmail.com>2026-02-05 21:41:37 +0100
commit194a47a99b3e3ae03c085721e94e5dd5b9a9f460 (patch)
tree3b1520d0234fd5e845c3669edf5a71f5727594a9 /src/audio/miniaudio_backend.cc
parentafded2b335a469ac550c345d1676a910a650a988 (diff)
feat(timeline-editor): Diagonal scroll following time-ordered sequence cascade
Enhancement: Smart Vertical Scrolling - Mouse wheel now scrolls diagonally (horizontal + vertical) - Automatically brings relevant sequence to top-left of viewport - Follows the time-ordered cascade of sequences Algorithm: 1. Scroll horizontally as before (timeline.scrollLeft += deltaY) 2. Calculate current time position (left edge of viewport) currentTime = scrollLeft / pixelsPerSecond 3. Find closest sequence at that time: - Last sequence that starts before or at currentTime - Sequences sorted by startTime 4. Smooth scroll vertically to target sequence: - targetScrollTop = seqIndex * 80px - Smooth transition: scrollTop += diff * 0.3 (not instant jump) User Experience: - Scroll forward in time → later sequences move to top - Scroll backward in time → earlier sequences move to top - Creates natural "diagonal" navigation along timeline - Top-left corner always shows the most relevant sequence Example timeline: Seq 0 (0s) ────────────── Seq 1 (5s) ────────────── Seq 2 (10s) ────────────── Scroll to 7s → Seq 1 moves to top (it's active at that time) Scroll to 12s → Seq 2 moves to top (it's active at that time) This provides intuitive navigation through time-ordered sequences.
Diffstat (limited to 'src/audio/miniaudio_backend.cc')
0 files changed, 0 insertions, 0 deletions