Give a peg handles on the stage
A peg was reachable and not usable. It is a `:group`, so it draws nothing, and both of the stage's ways in key off a DRAWN op: `pick/choose` hit-tests the ops, so a click never found it, and `handles` hangs its box, corners and turn knob off `pick/bounds-of`, so it got only the pivot cross — which is `pointer-events: none`. So the pivot `gesture/refusal` tells you to make could be made, and then only typed at in the inspector, and reselected only from a timeline row. Every assertion about the maths passed throughout, which is the point: nothing under `domain/` can see this. So the handles fall back to a fixed-size rosette about the peg's own origin — cross to move, knob to turn, four corners to scale. Fixed size, in stage pixels, because there is no drawing for it to be proportional to. The cross gets a transparent `.peg-grab` disc rather than taking the handler itself, since `.pivot` must stay `pointer-events: none` everywhere else: it is a mark on the picture and must not eat a click meant for the shape under it. `test/browser/peg.mjs` asserts the handles as DOM and drags through them with real pointer events, because that is the half a unit test cannot reach: a peg appears with no drift at all, is selected, renders one knob, four corners and no box, and dragging its cross moves its child by exactly the drag. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HkinzDz1VtahZVsujAGRBD
This commit is contained in:
parent
925c12fc77
commit
00b8ed34ee
3 changed files with 231 additions and 8 deletions
|
|
@ -1425,6 +1425,8 @@ button.share-button:hover, button.share-button.on { filter: brightness(1.1); }
|
|||
.paint-overlay .handles .knob { fill: #161820; stroke: #fff1be; stroke-width: 0.6; cursor: grab; }
|
||||
.paint-overlay .handles .corner { fill: #fff1be; stroke: #161820; stroke-width: 0.5; cursor: nwse-resize; }
|
||||
.paint-overlay .handles .pivot { stroke: #fff1be; stroke-width: 0.6; pointer-events: none; }
|
||||
/* A peg draws nothing, so the cross is the only thing to grab it by. */
|
||||
.paint-overlay .handles .peg-grab { fill: transparent; stroke: none; cursor: move; }
|
||||
.paint-overlay .marquee { fill: rgba(230, 202, 139, 0.12); stroke: #e6ca8b; stroke-width: 0.6; stroke-dasharray: 2 1; pointer-events: none; }
|
||||
|
||||
/* The creation-target outline and its name tag. Solid, no handles, and a tag pinned just
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue