-
Notifications
You must be signed in to change notification settings - Fork 58
Configuration
davidaurelio edited this page Sep 14, 2010
·
3 revisions
This is an overview about all global TouchScroll configuration options, including allowed value ranges and recommendations.
-
threshold: Number
The pixel distance that has to be covered to trigger scrolling. Defaults to10. 5 is ok on the iPhone, but not for devices with higher pixel density. -
scrollHandleMinSize: Number
The minimum size for the scrollbar handles. Defaults to25. Scrollbars may be taller, depending on the ratio of the sizes of the scroller and its contents. -
flicking.*
flicking configuration-
triggerThreshold: Number
Longest duration (in milliseconds) between the lasttouchmoveand thetouchendevent to trigger a flick. Defaults to150. Lower values might result in not triggering flicks when desired by the user, especially on cheaper touch screens.100works good on iPhone etc. -
friction: Number
The average friction factor (per millisecond). Used to calculate flick length and duration. Defaults to0.998. Must be between (not including)0and1. Lower values result in faster deceleration and vice versa. Don’t set lower than0.95(very short flick). -
minSpeed: Number
The minimum speed (in px/ms) before the flick stops. Used for pre-calculations, not for the actual animations. Defaults to0.15. Must be positive. Lower values result in longer flicks. -
timingFunc: Array<Number>
The control points for the flick animation timing function. Defaults to[0, 0.3, 0.6, 1]. You can use the great graphical tool at netzgesta.de to find values you like.
-
-
elasticity.*
bounce configuration-
factorDrag: Number
The elasticity factor when dragging. Defaults to0.5. You really want this to be a number between0and1. -
factorFlick: Number
The elasticity factor when flicking. Defaults to0.2. This should be between0and1, too. -
max: Number
Maximum bounce length (in pixels) when flicking. Defaults to100.
-
-
snapBack:*
snap back configuration-
timingFunc: Array<Number>
The control points for the snap back timing function. For snap backs following a bounce, the first control point (indexes0and1) is overwritten to achieve a smooth transition. Defaults to[0.4, 0, 1, 1]. -
defaultTime: Number
The default duration of the snap back in milliseconds. Defaults to400. -
alwaysDefaultTime: Boolean
Whether the snap back effect always uses the default time or uses the bounce out time when following a bounce. Defaults totrue.
-