mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-27 11:57:36 -06:00
A picture with Wrap Text > Behind Text could not be dragged where it overlapped text, in the body or in a header/footer. Pressing it did nothing; once it was selected some other way (Selection Pane, arrow keys) the arrow keys moved it, but the mouse never started a drag. Reported from the field (#82). Root cause: the hit test deliberately lets body text win over an object behind it (crates/layout/src/hit.rs: 'objects behind the text only where there's no text'), so objects::pointer never began a frame drag. Fix: grab_at/pointer now treat a Behind Text picture, shape or group as a drag candidate even where text covers it, in body and header/footer stories. The press does not take the gesture at once: it becomes an object drag only after the pointer passes the drag threshold (pending_behind), so a plain click still places the text caret in the overlapping text. Text boxes are unchanged (their inside is their text; only their border grabs them). Verified with three egui_kittest UI tests driving real pointer events, plus a headless ui_shot run against the real app: - floating_picture_can_be_dragged_in_front_of_or_behind_text - floating_header_picture_can_be_dragged_in_front_of_or_behind_text - behind_picture_dragged_over_text_without_being_selected_first Full wordcraft-ui-egui suite: 365 passed. Docs: ROADMAP progress log and revision, docs/ui-parity.md, docs/gaps.md (#3). Co-authored-by: Muthiullah Hib <thye911@mail.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>