发布

  • fix: stop the lane stack shaking on vertical scroll (#182) (#188)

    frostbyte_neo 发布于 2026-06-04 15:57:49 +00:00

    • fix: stop the waveform shaking while scrolled (#182)

    On a narrow panel the waveform overflows horizontally and both axes of
    .wave-scroll are overflow: auto. When the vertical scrollbar appeared it shrank
    clientWidth, which applyWaveZoom read to recompute the zoom and re-render the
    WaveSurfer canvas. That re-render shifted the overflow state and toggled the
    scrollbar again, an unbounded ResizeObserver feedback loop that showed as the
    waveform shaking while scrolled to the middle.

    Drive the zoom calc from offsetWidth (the layout width, unaffected by scrollbar
    appearance) instead of clientWidth, so scrollbar state can no longer feed back
    into zoom. Also skip the ResizeObserver re-zoom on height-only changes, and
    reserve the scrollbar gutter so the lanes do not shift when the scrollbar shows.

    Fixes #182.

    • fix: stop the lane stack shaking on vertical scroll (#182)

    The earlier offsetWidth / scrollbar-gutter approach in this branch was based on
    a wrong diagnosis (a zoom/scrollbar width loop) and is reverted here.

    Reproduced in WebKit: the waveform fits the panel (no horizontal scroll), the
    six lanes overflow vertically, and a vertical scroll to the middle made
    scrollTop oscillate 147 times across 150 frames, the visible shake.

    Cause: waves.css sets scroll-behavior: smooth on .wave-scroll, and the studio
    mirrors scrollTop between the mixer column and the wave lanes
    (wireLaneScrollSync). A smooth programmatic scroll turns that mirror into a
    feedback loop: every echo re-targets the in-flight animation, so the scroll
    never settles. Override scroll-behavior: auto on .daw .wave-scroll so the mirror
    is an instant no-op once both panes match.

    Verified in WebKit: reversals drop from 147 to 0 and scrollTop settles at once.

    Fixes #182.

    下载附件