##FlexScrollView 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
- class: FlexScrollView ⇐
ScrollController
⏏- new FlexScrollView(options)
- instance
.getPosition ⇒number
- .setOptions(options) ⇒
FlexScrollView
- .sequenceFrom(node) ⇒
FlexScrollView
- .getCurrentIndex() ⇒
Number
- .goToPage(index) ⇒
FlexScrollView
- .getOffset() ⇒
number
- .showPullToRefresh([footer]) ⇒
FlexScrollView
- .hidePullToRefresh([footer]) ⇒
FlexScrollView
- .isPullToRefreshVisible([footer])
- class: FlexScrollView ⇐
###class: FlexScrollView ⇐ ScrollController
⏏
Extends: ScrollController
####new FlexScrollView(options)
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) |
####flexScrollView.getPosition ⇒
Deprecated: truenumber
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.
Param | Type | Description |
---|---|---|
[node] | number |
If specified, returns the position of the node at that index in the Scrollview instance's currently managed collection. |
Returns: number
- The position of either the specified node, or the Scrollview's current Node,
in pixels translated.
####flexScrollView.setOptions(options) ⇒ FlexScrollView
Patches the FlexScrollView instance's options with the passed-in ones.
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). |
Returns: FlexScrollView
- this
####flexScrollView.sequenceFrom(node) ⇒ FlexScrollView
Sets the data-source (alias for setDataSource).
This function is a shim provided for compatibility with the stock famo.us Scrollview.
Param | Type | Description |
---|---|---|
node | Array | ViewSequence |
Either an array of renderables or a Famous viewSequence. |
Returns: FlexScrollView
- this
####flexScrollView.getCurrentIndex() ⇒ Number
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
####flexScrollView.goToPage(index) ⇒ FlexScrollView
Paginates the Scrollview to an absolute page index. This function is a shim provided
for compatibility with the stock famo.us Scrollview.
Param | Type | Description |
---|---|---|
index | Number |
view-sequence index to go to. |
Returns: FlexScrollView
- this
####flexScrollView.getOffset() ⇒ number
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.
####flexScrollView.showPullToRefresh([footer]) ⇒ FlexScrollView
Shows the pulls-to-refresh renderable indicating that a refresh is in progress.
Param | Type | Description |
---|---|---|
[footer] | Bool |
set to true to show pull-to-refresh at the footer (default: false). |
Returns: FlexScrollView
- this
####flexScrollView.hidePullToRefresh([footer]) ⇒ FlexScrollView
Hides the pull-to-refresh renderable in case it was visible.
Param | Type | Description |
---|---|---|
[footer] | Bool |
set to true to hide the pull-to-refresh at the footer (default: false). |
Returns: FlexScrollView
- this
####flexScrollView.isPullToRefreshVisible([footer])
Get the visible state of the pull-to-refresh renderable.
Param | Type | Description |
---|---|---|
[footer] | Bool |
set to true to get the state of the pull-to-refresh footer (default: false). |