#ScrollView Flexible ScrollView drop-in replacement for famo.us.
Key features:
- Customizable layout (uses ListLayout by default)
- Insert/remove at any position using animations
- Support for
true
size renderables - Horizontal/vertical direction
- Top/left or bottom/right alignment
- Pagination
- Option to embed in a ContainerSurface
Inherited from: ScrollController
##class: ScrollView ⏏
Extends: ScrollController
Members
###new ScrollView(options) Params
- options
Object
- Options (see ScrollController).
Extends: ScrollController
###scrollView.sequenceFrom(node)
Sets the data-source (alias for setDataSource).
This function is a shim provided for compatibility with the stock famo.us ScrollView.
Params
- node
Array
|ViewSequence
- Either an array of renderables or a Famous viewSequence.
Returns: ScrollView
- this
###scrollView.getCurrentIndex()
Returns the index of the first visible renderable.
This function is a shim provided for compatibility with the stock famo.us ScrollView.
Returns: Number
- The current index of the ViewSequence
###scrollView.goToPage(index)
Paginates the Scrollview to an absolute page index. This function is a shim provided
for compatibility with the stock famo.us ScrollView.
Params
- index
Number
- view-sequence index to go to.
Returns: ScrollView
- this
###scrollView.getOffset()
Returns the offset associated with the Scrollview instance's current node
(generally the node currently at the top).
This function is a shim provided for compatibility with the stock famo.us ScrollView.
Returns: number
- The position of either the specified node, or the Scrollview's current Node,
in pixels translated.
###ScrollView~getPosition([node])
Returns the position associated with the Scrollview instance's current node
(generally the node currently at the top).
This function is a shim provided for compatibility with the stock famo.us ScrollView.
Params
- [node]
number
- If specified, returns the position of the node at that index in the Scrollview instance's currently managed collection.
Deprecated
Scope: inner function of ScrollView
Returns: number
- The position of either the specified node, or the Scrollview's current Node,
in pixels translated.