mirror of
https://github.com/storytold/filmcraft.git
synced 2026-10-29 12:38:06 -06:00
Pressing a clip edge and dragging inward selected and moved the clip: the press was hit-tested only once egui recognised a drag, 6 pt later, by when the pointer had left the 7 px edge zone. And at a cut the left clip's Out edge claimed both sides, so the right clip's In edge could not be grabbed. What a press grabs is now worked out on the frame the button goes down (timeline_hit::grab_at, shared by the cursor, the press and ui.timeline.hit) and acted on by both the click and the drag. Inside a clip beats outside it, so the side of a cut picks the clip; zero-width clips have no edges. Trims, rolls, rate stretches and remixes move by how far the pointer moved since the press, and a moved clip stays under the point it was grabbed by. ui.timeline.hit takes `modifiers` and reports `kind`, the trim a press would start. Unit tests for the zones and tools; headless UI tests that drag a pixel or a few per frame at 60 fps (before: the clip moved, the wrong clip was trimmed, a wobbly click selected the clip, a moved clip lagged). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>