diff options
| author | Adam Soltys <[email protected]> | 2026-09-04 07:26:29 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-04 07:26:29 -0700 |
| commit | 3e6c88dd108f843f1a85cc7dd2565bee1f7caae2 (patch) | |
| tree | bef5399737d2e52cc66f630bd365375898ef402a | |
| parent | 2f6d30ebe9100fd6767858cb755445cd7a25cf84 (diff) | |
| download | coinosv3-3e6c88dd108f843f1a85cc7dd2565bee1f7caae2.tar.gz coinosv3-3e6c88dd108f843f1a85cc7dd2565bee1f7caae2.zip | |
TEMP: scroll trace records only while moving (+700ms tail) so flick motion survives in the buffer regardless of read timing
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr
| -rw-r--r-- | src/app.js | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -3195,6 +3195,7 @@ function dlog(s) { // (a stutter that isn't a dropped frame). try { let _lastFrame = performance.now(); + let _lastSl = -1, _movingUntil = 0; window.__scroll = []; const _fw = (t) => { const gap = t - _lastFrame; _lastFrame = t; @@ -3202,8 +3203,14 @@ try { try { const el = document.querySelector('.bal-carousel'); if (el) { - window.__scroll.push([Math.round(t), Math.round(el.scrollLeft), Math.round(gap)]); - if (window.__scroll.length > 400) window.__scroll.shift(); + const sl = Math.round(el.scrollLeft); + // record only while the scroll is actually moving (or just moved), so + // idle frames don't shift the flick motion out of the buffer + if (sl !== _lastSl) { _lastSl = sl; _movingUntil = t + 700; } + if (t < _movingUntil) { + window.__scroll.push([Math.round(t), sl, Math.round(gap)]); + if (window.__scroll.length > 800) window.__scroll.shift(); + } } } catch {} requestAnimationFrame(_fw); |
