Allow right-click edit entry when box display is turned off#1784
Open
mattdawkins wants to merge 1 commit into
Open
Allow right-click edit entry when box display is turned off#1784mattdawkins wants to merge 1 commit into
mattdawkins wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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