Skip to content

Allow right-click edit entry when box display is turned off#1784

Open
mattdawkins wants to merge 1 commit into
mainfrom
fix/right-click-edit-hidden-layers
Open

Allow right-click edit entry when box display is turned off#1784
mattdawkins wants to merge 1 commit into
mainfrom
fix/right-click-edit-hidden-layers

Conversation

@mattdawkins

Copy link
Copy Markdown
Member

Problem

With box display toggled off, right-clicking a detection to enter edit mode stops working (e.g. finalize a polygon, turn off box display, then right-click another detection — nothing happens until boxes are re-enabled).

Cause

Turning off box display called rectAnnotationLayer.disable(), which empties the layer's feature data. That layer's rectangles are the click target covering every detection, and geojs only fires feature mouse events on existing features — so a detection without a polygon had nothing left to right-click.

Fix

When box display is off, the rectangle layer now keeps its features as invisible hit targets: nothing is drawn (no stroke, no fill, no rotation arrow), left-clicks and hover tooltips ignore them, but right-click still enters edit mode. Editing is now reachable regardless of which display types are visible, and a duplicate emit from an overlapping polygon is already deduped by the click handler's same-tick guard.

🤖 Generated with Claude Code

Turning off box display emptied the rectangle layer's features, and
since that layer is the click target covering every detection, a
detection without a polygon had nothing left to right-click: entering
edit mode silently stopped working until boxes were re-enabled.

The rectangle layer now keeps its features as invisible hit targets
when box display is off: nothing is drawn (no stroke, fill, or rotation
arrow), left-clicks and hover tooltips ignore them, but right-click
still enters edit mode for the detection, regardless of which display
types are visible.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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