- core
- Context
- ElementAllocator
- ElementOutput
- Engine
- Entity
- EventEmitter
- EventHandler
- Group
- Modifier
- OptionsManager
- RenderNode
- Scene
- SpecParser
- Transform
- View
- ViewSequence
- events
- EventArbiter
- EventFilter
- EventMapper
- inputs
- Accumulator
- GenericSync
- MouseSync
- PinchSync
- RotateSync
- ScaleSync
- ScrollSync
- TouchSync
- TouchTracker
- TwoFingerSync
- math
- Matrix
- Quaternion
- Random
- Utilities
- Vector
- modifiers
- Draggable
- Fader
- ModifierChain
- StateModifier
- physics
- PhysicsEngine
- physics/bodies
- Body
- Circle
- Particle
- Rectangle
- physics/constraints
- Surface
- Collision
- Constraint
- Curve
- Distance
- Snap
- Wall
- Walls
- physics/forces
- Drag
- Force
- Repulsion
- RotationalDrag
- RotationalSpring
- Spring
- VectorField
- physics/integrators
- SymplecticEuler
- surfaces
- CanvasSurface
- ContainerSurface
- ImageSurface
- InputSurface
- TextareaSurface
- VideoSurface
- transitions
- CachedMap
- Easing
- MultipleTransition
- SnapTransition
- SpringTransition
- Transitionable
- TransitionableTransform
- TweenTransition
- WallTransition
- utilities
- KeyCodes
- Timer
- Utility
- views
- ContextualView
- Deck
- DrawerLayout
- EdgeSwapper
- FlexibleLayout
- Flipper
- GridLayout
- HeaderFooterLayout
- Lightbox
- RenderController
- ScrollContainer
- Scroller
- Scrollview
- SequentialLayout
- widgets
- NavigationBar
- TabBar
Scrollview
Scrollview will lay out a collection of renderables sequentially in the specified direction, and will allow you to scroll through them with mousewheel or touch events.
Overview
Options
Methods
Scrollview(options, clipSize, margin, friction, drag, edgeGrip, egePeriod, edgeDamp, paginated, pagePeriod, pageDamp, pageStopSpeed, pageSwitchSpeed, speedLimit)
Constructor Parameters
options
Options
An object of configurable options.
clipSize
Number
The size of the area (in pixels) that Scrollview will display content in.
margin
Number
The size of the area (in pixels) that Scrollview will process renderables' associated calculations in.
friction
Number
Input resistance proportional to the velocity of the input. Controls the feel of the Scrollview instance at low velocities.
drag
Number
Input resistance proportional to the square of the velocity of the input. Affects Scrollview instance more prominently at high velocities.
edgeGrip
Number
A coefficient for resistance against after-touch momentum.
egePeriod
Number
Sets the period on the spring that handles the physics associated with hitting the end of a scrollview.
edgeDamp
Number
Sets the damping on the spring that handles the physics associated with hitting the end of a scrollview.
paginated
Boolean
A paginated scrollview will scroll through items discretely rather than continously.
pagePeriod
Number
Sets the period on the spring that handles the physics associated with pagination.
pageDamp
Number
Sets the damping on the spring that handles the physics associated with pagination.
pageStopSpeed
Number
The threshold for determining the amount of velocity required to trigger pagination. The lower the threshold, the easier it is to scroll continuosly.
pageSwitchSpeed
Number
The threshold for momentum-based velocity pagination.
speedLimit
Number
The highest scrolling speed you can reach.
Methods
getCurrentIndex()
Returns the index of the first visible renderable
Returns
goToPreviousPage()
goToPreviousPage paginates your Scrollview instance backwards by one item.
Returns
goToNextPage()
goToNextPage paginates your Scrollview instance forwards by one item.
Returns
goToPage()
Paginates the Scrollview to an absolute page index.
getPosition(node)Deprecated
Returns the position associated with the Scrollview instance's current node (generally the node currently at the top).
Parameters
Returns
getAbsolutePosition()
Returns the absolute position associated with the Scrollview instance
Returns
getOffset(node)
Returns the offset associated with the Scrollview instance's current node (generally the node currently at the top).
Parameters
Returns
setPosition(x)Deprecated
Sets the position of the physics particle that controls Scrollview instance's "position"
Parameters
setPosition(x)
Sets the offset of the physics particle that controls Scrollview instance's "position"
Parameters
getVelocity()
Returns the Scrollview instance's velocity.
Returns
setVelocity(v)
Sets the Scrollview instance's velocity. Until affected by input or another call of setVelocity the Scrollview instance will scroll at the passed-in velocity.
Parameters
setOptions(options)
Patches the Scrollview instance's options with the passed-in ones.
Parameters
sequenceFrom(node)
Sets the collection of renderables under the Scrollview instance's control, by setting its current node to the passed in ViewSequence. If you pass in an array, the Scrollview instance will set its node as a ViewSequence instantiated with the passed-in array.
Parameters
getSize()
Returns the width and the height of the Scrollview instance.
Returns
render()Private
Generate a render spec from the contents of this component.