Repository navigation
Start a new stroke when another finger takes over the drag - #27
Conversation
When the stroke's finger lifts while another is down, end the stroke and start a new one where the other finger is, instead of ignoring the rest of the drag. Clear the stroke's pointer when the drag ends or is cancelled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. 6 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour. 📝 WalkthroughWalkthroughSignaturePad now tracks the pointer associated with an active stroke. It handles pointer changes by ending the current stroke and starting another. Three gesture tests cover pointer changes, lifts, and stroke completion. ChangesMulti-pointer stroke handling
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable merge-blocking defect is established in the pointer-takeover change. Merge after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Replaces #20 by @Bayram-MKININI, which was closed after I force-pushed the wrong commit to its branch. The commits are the same, rebased on master, and the first one is still credited to @Bayram-MKININI.
If a second finger or a palm is on the pad when the drawing finger lifts, the drag carries on with the second finger. Before, that drew a line across the pad from where the first finger lifted to the second one.
Now the stroke ends where the first finger lifted, and the second finger starts a new stroke where it is. The same happens if the first finger lifts before the drag starts and another finger starts it. The stroke's finger id is cleared when the drag ends or is cancelled. Moves that Android batches between frames are drawn for whichever finger is drawing.
Known gap: if the first finger moves in the same event where it lifts while another finger is down, that last bit of movement is lost. Compose's drag detector switches fingers without reporting it.
Tests: two-finger UI tests in
SignaturePadGestureTestcover a finger taking over mid-stroke, a second finger lifting without moving, and a drag started by the second finger.🤖 Generated with Claude Code
Summary by CodeRabbit