DragScrollNode

A scroll viewport whose content supports tap-or-drag recognition and kinetic scrolling.

The runtime defers primary presses over ordinary descendants until release, cancels activation after movement, and scrolls this viewport after vertical movement exceeds its logical drag threshold. Descendant PointerCaptureNode controls retain exclusive dragging; HorizontalDragNode controls arbitrate by direction. Gesture ownership and momentum end on input reset, removal, unplacement, detachment, or close.

Properties

Link copied to clipboard
abstract val canDragScroll: Boolean

Whether the current content has a scrollable vertical range.

Link copied to clipboard

Stable identity of the current navigation state, compared by reference.

Link copied to clipboard

Content-drag recognition and inertia policy for this viewport.

Functions

Link copied to clipboard
abstract fun onPointerEvent(event: PointerEvent, localPosition: IntOffset): InputResult

Handles a pointer event after layout hit testing.

Link copied to clipboard
open fun onPointerGesture(gesture: PointerGesture, localPosition: IntOffset): InputResult

Handles an adapter-recognized navigation gesture under the same hit and clipping rules as pointer input. Ignoring preserves compatibility for tap-only nodes; no press, activation or focus transition is synthesized. Pan deltas use receiver-local logical units, while zoom factors are dimensionless.

Link copied to clipboard
abstract fun scrollByDrag(delta: Double): Double

Changes the vertical offset by delta logical pixels and returns the displacement actually consumed.