Flexible FlexScrollView for famo.us.
Key features:
- Customizable layout (uses ListLayout by default)
- Insert/remove at any position using animations
- Support for
true
size renderables - Pull to refresh (header & footer)
- Horizontal/vertical direction
- Top/left or bottom/right alignment
- Pagination
- Option to embed in a ContainerSurface
- FlexScrollView linking
Inherited from: ScrollController
- FlexScrollView
- FlexScrollView ⇐
ScrollController
⏏- new FlexScrollView(options)
.getPosition ⇒number
- .setOptions(options) ⇒
FlexScrollView
- .sequenceFrom(node) ⇒
FlexScrollView
- .getCurrentIndex() ⇒
Number
- .goToPage(index, [noAnimation]) ⇒
FlexScrollView
- .getOffset() ⇒
number
- .getAbsolutePosition() ⇒
number
- .showPullToRefresh([footer]) ⇒
FlexScrollView
- .hidePullToRefresh([footer]) ⇒
FlexScrollView
- .isPullToRefreshVisible([footer])
- FlexScrollView ⇐
Kind: Exported class
Extends: ScrollController
Param | Type | Description |
---|---|---|
options | Object |
Configurable options (see ScrollController for all inherited options). |
[options.pullToRefreshHeader] | Renderable |
Pull to refresh renderable that is displayed when pulling down from the top. |
[options.pullToRefreshFooter] | Renderable |
Pull to refresh renderable that is displayed when pulling up from the bottom. |
[options.leadingScrollView] | FlexScrollView |
Leading scrollview into which input events are piped (see Tutorial) |
[options.trailingScrollView] | FlexScrollView |
Trailing scrollview into which input events are piped (see Tutorial) |
Deprecated
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.
Kind: instance property of FlexScrollView
Returns: number
- The position of either the specified node, or the Scrollview's current Node,
in pixels translated.
Param | Type | Description |
---|---|---|
[node] | number |
If specified, returns the position of the node at that index in the Scrollview instance's currently managed collection. |
Patches the FlexScrollView instance's options with the passed-in ones.
Kind: instance method of FlexScrollView
Returns: FlexScrollView
- this
Param | Type | Description |
---|---|---|
options | Object |
Configurable options (see ScrollController for all inherited options). |
[options.pullToRefreshHeader] | Renderable |
Pull to refresh renderable that is displayed when pulling down from the top. |
[options.pullToRefreshFooter] | Renderable |
Pull to refresh renderable that is displayed when pulling up from the bottom. |
[options.leadingScrollView] | FlexScrollView |
Leading scrollview into which input events are piped (see Tutorial). |
[options.trailingScrollView] | FlexScrollView |
Trailing scrollview into which input events are piped (see Tutorial). |
Sets the data-source (alias for setDataSource).
This function is a shim provided for compatibility with the stock famo.us Scrollview.
Kind: instance method of FlexScrollView
Returns: FlexScrollView
- this
Param | Type | Description |
---|---|---|
node | Array | LinkedListViewSequence |
Either an array of renderables or a viewSequence. |
Returns the index of the first visible renderable.
This function is a shim provided for compatibility with the stock famo.us Scrollview.
Kind: instance method of FlexScrollView
Returns: Number
- Index of the first visible renderable.
Paginates the Scrollview to an absolute page index. This function is a shim provided for compatibility with the stock famo.us Scrollview.
Kind: instance method of FlexScrollView
Returns: FlexScrollView
- this
Param | Type | Description |
---|---|---|
index | Number |
view-sequence index to go to. |
[noAnimation] | Bool |
When set to true, immediately shows the node without scrolling animation. |
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.
Kind: instance method of FlexScrollView
Returns: number
- The position of either the specified node, or the Scrollview's current Node,
in pixels translated.
Returns the absolute position associated with the Scrollview instance.
This function is a shim provided for compatibility with the stock famo.us Scrollview.
Kind: instance method of FlexScrollView
Returns: number
- The position of the Scrollview's current Node, in pixels translated.
Shows the pulls-to-refresh renderable indicating that a refresh is in progress.
Kind: instance method of FlexScrollView
Returns: FlexScrollView
- this
Param | Type | Description |
---|---|---|
[footer] | Bool |
set to true to show pull-to-refresh at the footer (default: false). |
Hides the pull-to-refresh renderable in case it was visible.
Kind: instance method of FlexScrollView
Returns: FlexScrollView
- this
Param | Type | Description |
---|---|---|
[footer] | Bool |
set to true to hide the pull-to-refresh at the footer (default: false). |
Get the visible state of the pull-to-refresh renderable.
Kind: instance method of FlexScrollView
Param | Type | Description |
---|---|---|
[footer] | Bool |
set to true to get the state of the pull-to-refresh footer (default: false). |