diff --git a/app.js b/app.js index 23237d1..d5f55db 100644 --- a/app.js +++ b/app.js @@ -6280,6 +6280,7 @@ function ensureFont(name) { /* ── Main loop ── */ let lastTs = null; +let playheadPx = -1; function loop(ts) { if (lastTs == null) lastTs = ts; const dt = Math.min(0.1, (ts - lastTs) / 1000); @@ -6305,7 +6306,11 @@ function loop(ts) { drawFrame(); } if (state.dirtyTimeline) rebuildClips(); - els.playhead.style.left = state.time * state.pps + "px"; + const phX = Math.round(state.time * state.pps); + if (phX !== playheadPx) { + playheadPx = phX; + els.playhead.style.left = phX + "px"; + } drawRuler(); updateSafeOverlay(); updateKfGraphs(); diff --git a/style.css b/style.css index bc33913..cba587f 100644 --- a/style.css +++ b/style.css @@ -1542,6 +1542,7 @@ input[type=range] { .timeline-scroll { flex: 1; + min-height: 0; overflow-x: auto; overflow-y: auto; position: relative; @@ -1560,6 +1561,9 @@ input[type=range] { .tracks-content { position: relative; + /* clip so abspos playhead `left` cannot grow the scroller's overflow */ + overflow: clip; + overflow-clip-margin: 8px; } .work-dim { position: absolute; @@ -1876,6 +1880,7 @@ body.track-size-s .clip .clip-kf-n { background: #ff4d6a; z-index: 4; pointer-events: none; + contain: layout; } .playhead-cap {