Skip to content

fix(editor): a spotlight resizes by its handles - #2

Closed
jondkinney wants to merge 1 commit into
mainfrom
fix/spotlight-handles
Closed

jondkinney wants to merge 1 commit into
mainfrom
fix/spotlight-handles

Conversation

@jondkinney

@jondkinney jondkinney commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Drag a spotlight's corner handle and you get a marquee selection instead of a resize.

The handles are drawn on the layer's bounding box, but a spotlight is hit-tested against its opening, so for the default ellipse the corner lands outside the shape, out in the dimmed surround. The press finds no layer, reads as empty canvas, and starts a marquee.

So the press asks which handle is under the pointer before it asks which layer is. That's the cheaper question anyway, since the handle belongs to a layer that's already selected, and it's the only order that works for any layer whose handles can sit outside itself. It also let me collapse two copies of the handle-tolerance test into one.

Draw a spotlight, leave it selected, drag a corner: on main the canvas dims into a marquee, here it resizes. runSpotlightHandleSmoke (exit 96) is deliberately narrow: make handles stop answering for spotlights only and every other handle test still passes.

@jondkinney
jondkinney force-pushed the fix/spotlight-handles branch from 1f2efcd to 47f6afc Compare August 19, 2026 13:08
The handles sit on a layer's bounds, but a spotlight is hit-tested
against its opening, so for the default elliptical shape the corner
handle lies outside the shape, a press there read as empty canvas, and
dragging it started a marquee instead of resizing. The press now asks
which handle is under the pointer before it asks which layer is, which
also leaves one copy of the tolerance test instead of two.
@jondkinney
jondkinney force-pushed the fix/spotlight-handles branch from 47f6afc to 61c6476 Compare August 19, 2026 14:48
@jondkinney

Copy link
Copy Markdown
Owner Author

Opened upstream as omacom#52. Closing this one; it was only for review before submitting. The branch fix/spotlight-handles stays put, since the upstream PR points at it.

@jondkinney jondkinney closed this Aug 19, 2026
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