mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-01 05:58:12 -06:00
Edit text's paragraph edges were tested twice: by edit_text_ui for the cursor, on the page's paragraphs, and by object_ui for the press, on its own object inventory (grabs_edge). Where the two inventories disagree, the resize arrow shows and a press starts an invisible area selection instead (#2276, the review's step-3 probe). The open paragraph's frame showed the Move cursor 4 px out and took the press 6 px out. Each of these parts now has one hit test, in the page router's table, and acts only on the press it was captured on: - edit_text_ui::hit: a paragraph's edges (Handle), its body (Text; Editor for the open one). - edit_text_ui::picture_hit and picture_handle_hit: a picture's body on the Text layer, asked before the paragraphs, so text on top of artwork takes the press; the selected picture's corners and rotate knob on Handle, asked after them, so they win over text. - object_ui::hit: the objects selected together (Placed) and the open paragraph's frame (Handle), with one reach (FRAME_REACH, 6 px) for the cursor and the press. An area selection starts only where nobody's hit claims the press. - content_ui::hit: added text and pictures (Placed; the selected one's corners on Handle), over form fields; Add text starts a new box only where nobody's hit claims the press. image_owns_pointer and content_ui::select_grabs go, with the edge test object_ui kept a copy of (grabs_edge). The page's hits move into canvas::PageHits. Un-ignores a_paragraph_edge_resizes_wherever_it_shows_the_resize_cursor: it passes on main already (the inventories agree for its paragraph since the probe was written), so it stays as a guard rather than as proof. New test an_open_paragraphs_frame_shows_move_wherever_a_press_takes_the_box fails on the previous commit (the cursor is Default there). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>