Edge-scroll the arrangement roll while dragging a selection (v0.26.0)
A long-press selection drag could only reach what was already on screen — about four bars — so selecting a long span meant selecting, scrolling, and selecting again. Dragging into either edge of the roll's viewport now scrolls it under the finger, and the selection keeps extending while it moves. Speed ramps with how deep into the 56.dp edge zone the finger is, so easing in creeps for fine work and pushing to the rim covers roughly 15 bars a second. Both edges, not just the right one: scrolling out is not much use without scrolling back, and a drag that overshoots has to be able to return. The subtlety is that a pointer's canvas-local x goes stale the moment the view moves beneath it, and no new pointer event arrives at all while the finger is held still at the rim — which is exactly the case that has to keep working. The drag therefore tracks a VIEWPORT-relative x and recomputes the beat against the live scroll.value each frame, rather than trusting the last reported position. The per-frame loop only runs between onDragStart and onDragEnd/onDragCancel, and it applies a selection update only when the beat under the finger actually changes, so an edge scroll does not bump the revision sixty times a second. Verified on an emulator with synthesised motionevents (adb input swipe cannot hold still long enough to trigger a long press): a right-edge drag carried the view from bar 1 to bar 34 with the selection following; a left-edge drag carried it back to bar 12; the scroll stops dead on finger lift, with no drift four seconds later; and an ordinary drag inside the viewport still selects a single bar without scrolling at all. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
c2aedcc95c
commit
68e9ed8b41
+2
-2
@@ -8,8 +8,8 @@
|
||||
# or polish. android.versionCode is monotonic and bumps by 1 on every release,
|
||||
# because F-Droid and the Android package manager order installs by it alone.
|
||||
|
||||
android.versionName = 0.25.0
|
||||
android.versionCode = 54
|
||||
android.versionName = 0.26.0
|
||||
android.versionCode = 55
|
||||
|
||||
# No desktop builds exist yet. These lines are the agreed slots so a port starts
|
||||
# with a version instead of inventing one; `-` means "not built on this
|
||||
|
||||
Reference in New Issue
Block a user