Editor: the box's button is checked everywhere, or docks by the switch
Review fix round 2. buttonSpot returns nothing unchecked: every answer passes one fits() test (inside the stage, over no handle). After its five places it searches the whole stage, nearest the box's top end corner first and within 48px of the box preferred; the search takes the stage's edges and the handles' far edges as well as a 2px grid, so it finds a place whenever there is one. With none it returns null, and box-menu.mjs docks the button beside the view switch (data-docked). Tests: the reviewer's 100x52 box, boxes filling stages, fractions, and 3000 seeded random boxes in stages from 160 to 1920 wide, each answer checked and each null confirmed by a half-pixel brute-force search; the docked fallback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 files changed,
+156
−42
fixtures/box-menu.mjs+15 −2fixtures/box-menu.test.mjs+33 −1fixtures/box-spot.mjs+35 −23fixtures/box-spot.test.mjs+57 −0internal/slides/credits/assets.json+1 −1internal/slides/static/{editor.bd51417403608322.js => editor.e08a0a4c7c160e02.js}+15 −15
fixtures/box-menu.mjsLoading diff…
fixtures/box-menu.test.mjsLoading diff…
fixtures/box-spot.mjsLoading diff…
fixtures/box-spot.test.mjsLoading diff…
internal/slides/credits/assets.jsonLoading diff…
internal/slides/static/{editor.bd51417403608322.js => editor.e08a0a4c7c160e02.js}Loading diff…