Skip to content

Make right-click recenter opt-in - #1836

Merged
BryonLewis merged 3 commits into
mainfrom
dev/right-click-recenter-setting
Aug 10, 2026
Merged

Make right-click recenter opt-in#1836
BryonLewis merged 3 commits into
mainfrom
dev/right-click-recenter-setting

Conversation

@mattdawkins

Copy link
Copy Markdown
Member

Right-click in the annotator recenters the view on the clicked point. That has
been on unconditionally since #1747 (AlignedImageLayer), including in single
camera, non-aligned datasets. It fights right-click's primary role as the
context/edit action: right-clicking a detection to edit it also jumps the view.

Gate it on a User Settings toggle, defaulting off. The behavior is
unchanged for anyone who turns it on.

  • navigationSettings.rightClickRecenter in clientSettings (persisted, default false)
  • useLayerManagerAlignedView ANDs it with the existing "not while editing geometry" guard
  • Toggle in the User Settings dialog

Tests cover all three states: no recenter by default, recenter when enabled,
and left-click ignored when enabled.

🤖 Generated with Claude Code

Right-click recentering the annotator has been on unconditionally since
#1747, which fights right-click's primary role as the edit action. Gate it
on a User Settings toggle, defaulting off.
@mattdawkins
mattdawkins requested a review from BryonLewis August 10, 2026 15:38
@BryonLewis

Copy link
Copy Markdown
Collaborator

This is an issue indicated by that PR, but it should probablly default to the track locking indicator and not some new setting. The current lock icon is used to center when selecting tracks and it should probably use that.

Reuse the existing "center camera on selected track" control instead of a
second setting for the same idea. Still off by default.
@mattdawkins

Copy link
Copy Markdown
Member Author

Good call — done in 14cb2b8. Dropped the new setting entirely and gated the recenter on annotatorPreferences.lockedCamera.enabled, so the lock icon ("center camera on selected track") is now the single control for "the camera may move itself." Still off by default, and still suppressed while creating/editing geometry where right-click means "remove last point."

One thing worth a sanity check from you, since it's a behavior change rather than just a relocation: the two are now coupled in both directions. Enabling the lock to get track-following also turns right-click recenter on, and anyone who wants right-click-to-center has to accept the camera jumping on every track selection. That seems like the intent — they're both "auto-centering" — but if you'd rather they stay independent, the alternative is a second entry in the lock icon's popover (next to Transition / Multiply Bounds) rather than a User Settings switch. Say the word and I'll move it there.

Tests cover the three states: no recenter with the lock off, recenter with it on, left-click ignored either way. Worth noting the aligned-view spec's viewer mock had no center at all before this, which is how the behavior shipped on-by-default in #1747 without anything catching it.

@BryonLewis BryonLewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small change to suppress multiple component warnings in the testing for useLayerManagerAlignedView

@BryonLewis
BryonLewis merged commit 6a2065d into main Aug 10, 2026
3 checks passed
@BryonLewis
BryonLewis deleted the dev/right-click-recenter-setting branch August 10, 2026 18:37
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.

2 participants