Scoop API

scoop:scoop.ui:0.1.0

src/scroll/pan_options.scoop

Selected production source · src/scroll/pan_options.scoop

1package scoop.ui
3/** Whether an enclosing viewport may consume the remaining movement. */
4public enum ScrollChain {
5 Chain, Contain
6}
8/** Direct-contact scrolling does not change native wheel or trackpad behavior. */
9public class TouchScrollOptions public constructor(
10 public val enabled: Boolean = true,
11 public val threshold: Double = 8.0,
12 public val lockAxis: Boolean = true,
13 public val claimAtBoundary: Boolean = true
14) {
15 init {
16 requireUi(
17 threshold.isFinite() && threshold >= 0.0,
18 "touch scroll threshold must be finite and nonnegative"
19 )
20 }