mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-21 01:18:43 +00:00
In Photoshop, while a filter dialog with a preview window is open (Smart Sharpen, Unsharp Mask, Reduce Noise...), the pointer over the document is a small square and a click centres the dialog's preview on that point. PhotoCraft ignored canvas clicks under the dialog, so the preview could only be panned from inside it. The shared in-dialog preview (filter_preview_ui) gains locator(), the top dialog when it shows the preview window (not while the image holds the Blur Gallery pins or Replace Color's armed eyedropper), and center_at(), which writes the clamped document point into the dialog's existing private view fields. No command runs, so the document and its history are untouched. The canvas's dialog input routes a press or drag on the free canvas through the view transform to center_at, with any tool, and shows a small square locator cursor there, like the Color Picker's pipette. Space, middle-drag and the held zoom keys still pan and zoom. ui.pointer does the same for agents; before, its events reached the tool under the dialog and a Brush gesture painted. Tests: harness tests through the real canvas path (Smart Sharpen click and drag, Unsharp Mask off-image clamp, rotated view, ui.pointer, and a click with no dialog still painting), plus a unit test for center_at. docs/ui-parity.md gets the row and revision entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>