Expand description
A held drag following its scroller.
Two things a caret drag or a drag-select needs beyond the press, the motion and the release, both of them about the frame moving under a pointer that did not: when the layout under the held pointer changes — a wheel notch, a scroller nudged, a virtual list re-sliced — the live end is placed again where the pointer is; and when the pointer is held past the scroller’s edge, the core is what changes the layout, at a rate from how far past. Both run at the start of every frame against the frame that finished, so the frame being built paints the result.
The scroller is found once, at the press: the nearest ancestor-or-self
of the pressed node that scrolls, or that declared on_scroll — the
second kind is nudged as an event, since the core holds nothing of
what it scrolls (a cells grid is one screenful of the app’s history;
decision 4).
Constants§
- AUTOSCROLL_
RATE - Logical px per second of scrolling, per logical px past the edge: 60 px past is 600 px/s, the reach is 1000 px/s.
- AUTOSCROLL_
REACH - Past this many logical px beyond the edge the step stops speeding up.
- CLOCKLESS_
FRAME - The frame a core with no clock takes, in seconds — a sixtieth, so a headless drive steps by a knowable amount. A clockless core does not snap here: there is no end state to snap to.