Skip to content

[players] Tighten panzoom and add scrub/focus shortcuts#2035

Merged
frankrousseau merged 1 commit into
cgwire:mainfrom
frankrousseau:main
Jun 4, 2026
Merged

[players] Tighten panzoom and add scrub/focus shortcuts#2035
frankrousseau merged 1 commit into
cgwire:mainfrom
frankrousseau:main

Conversation

@frankrousseau
Copy link
Copy Markdown
Contributor

Problems

Solutions

  • Gate panzoom binding on the media's natural size, add
    beforeMouseDown / beforeWheel guards, and set
    disableKeyboardInteraction: true.
  • Wrap each annotation canvas in a per-viewer slot clipped at the
    viewer's edge.
  • Defer MultiVideoViewer panzoom to loadedmetadata and reset it once
    bound.
  • Read defaultHeight from reactive window.innerWidth / innerHeight.
  • Shift+drag scrubs from anywhere in the player; Shift+Tab toggles focus
    with the comment textarea; nested players let the innermost handle the
    event.
  • overscroll-behavior-x: contain on player + timeline, touch-action: pan-y on progress bars.

When the comparison viewer's revision was swapped, its panzoom was
rebuilt at identity but the panzoomTransform watcher only fires on
value changes — so a fresh comparison instance stayed at (0,0,1)
while the main viewer kept its zoom, and the two drifted apart. Have
VideoViewer / PictureViewer emit panzoom-ready after each setup
(PreviewViewer forwards it), and push the main viewer's current
transform onto the comparison from PreviewPlayer's handler.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@frankrousseau frankrousseau merged commit 3d0024b into cgwire:main Jun 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant