Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Commit

Permalink
Updated documentation to the latest jsdoc2md
Browse files Browse the repository at this point in the history
  • Loading branch information
IjzerenHein committed Jan 29, 2015
1 parent 5ca4ada commit 75aaba8
Show file tree
Hide file tree
Showing 15 changed files with 717 additions and 712 deletions.
166 changes: 83 additions & 83 deletions docs/FlexScrollView.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<a name="module_FlexScrollView"></a>
#FlexScrollView
##FlexScrollView
Flexible FlexScrollView for famo.us.

Key features:
Expand All @@ -15,122 +15,122 @@ Key features:

Inherited from: [ScrollController](./ScrollController.md)

<a name="exp_module_FlexScrollView"></a>
##class: FlexScrollView ⏏
**Extends**: `ScrollController`
**Members**

* [class: FlexScrollView ⏏](#exp_module_FlexScrollView)
* [new FlexScrollView(options)](#exp_new_module_FlexScrollView)
* [~~flexScrollView.getPosition~~](#module_FlexScrollView#getPosition)
* [flexScrollView.setOptions(options)](#module_FlexScrollView#setOptions)
* [flexScrollView.sequenceFrom(node)](#module_FlexScrollView#sequenceFrom)
* [flexScrollView.getCurrentIndex()](#module_FlexScrollView#getCurrentIndex)
* [flexScrollView.goToPage(index)](#module_FlexScrollView#goToPage)
* [flexScrollView.getOffset()](#module_FlexScrollView#getOffset)
* [flexScrollView.showPullToRefresh([footer])](#module_FlexScrollView#showPullToRefresh)
* [flexScrollView.hidePullToRefresh([footer])](#module_FlexScrollView#hidePullToRefresh)
* [flexScrollView.isPullToRefreshVisible([footer])](#module_FlexScrollView#isPullToRefreshVisible)

<a name="exp_new_module_FlexScrollView"></a>
###new FlexScrollView(options)
**Params**

- options `Object` - Configurable options (see ScrollController for all inherited options).
- \[pullToRefreshHeader\] `Renderable` - Pull to refresh renderable that is displayed when pulling down from the top.
- \[pullToRefreshFooter\] `Renderable` - Pull to refresh renderable that is displayed when pulling up from the bottom.
- \[leadingScrollView\] `FlexScrollView` - Leading scrollview into which input events are piped (see Tutorial)
- \[trailingScrollView\] `FlexScrollView` - Trailing scrollview into which input events are piped (see Tutorial)

**Extends**: `ScrollController`
<a name="module_FlexScrollView#getPosition"></a>
###~~flexScrollView.getPosition~~

* [FlexScrollView](#module_FlexScrollView)
* [class: FlexScrollView](#exp_module_FlexScrollView--FlexScrollView) ⇐ <code>ScrollController</code> ⏏
* [new FlexScrollView(options)](#new_module_FlexScrollView--FlexScrollView_new)
* _instance_
* ~~[.getPosition](#module_FlexScrollView--FlexScrollView#getPosition) ⇒ <code>number</code>~~
* [.setOptions(options)](#module_FlexScrollView--FlexScrollView#setOptions) ⇒ <code>FlexScrollView</code>
* [.sequenceFrom(node)](#module_FlexScrollView--FlexScrollView#sequenceFrom) ⇒ <code>FlexScrollView</code>
* [.getCurrentIndex()](#module_FlexScrollView--FlexScrollView#getCurrentIndex) ⇒ <code>Number</code>
* [.goToPage(index)](#module_FlexScrollView--FlexScrollView#goToPage) ⇒ <code>FlexScrollView</code>
* [.getOffset()](#module_FlexScrollView--FlexScrollView#getOffset) ⇒ <code>number</code>
* [.showPullToRefresh([footer])](#module_FlexScrollView--FlexScrollView#showPullToRefresh) ⇒ <code>FlexScrollView</code>
* [.hidePullToRefresh([footer])](#module_FlexScrollView--FlexScrollView#hidePullToRefresh) ⇒ <code>FlexScrollView</code>
* [.isPullToRefreshVisible([footer])](#module_FlexScrollView--FlexScrollView#isPullToRefreshVisible)

<a name="exp_module_FlexScrollView--FlexScrollView"></a>
###class: FlexScrollView ⇐ <code>ScrollController</code> ⏏
**Extends:** <code>ScrollController</code>
<a name="new_module_FlexScrollView--FlexScrollView_new"></a>
####new FlexScrollView(options)
| Param | Type | Description |
| ----- | ---- | ----------- |
| options | <code>Object</code> | Configurable options (see ScrollController for all inherited options). |
| \[options.pullToRefreshHeader\] | <code>Renderable</code> | Pull to refresh renderable that is displayed when pulling down from the top. |
| \[options.pullToRefreshFooter\] | <code>Renderable</code> | Pull to refresh renderable that is displayed when pulling up from the bottom. |
| \[options.leadingScrollView\] | <code>FlexScrollView</code> | Leading scrollview into which input events are piped (see Tutorial) |
| \[options.trailingScrollView\] | <code>FlexScrollView</code> | Trailing scrollview into which input events are piped (see Tutorial) |

<a name="module_FlexScrollView--FlexScrollView#getPosition"></a>
####~~flexScrollView.getPosition ⇒ <code>number</code>~~
***Deprecated:*** true

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.
| Param | Type | Description |
| ----- | ---- | ----------- |
| \[node\] | <code>number</code> | If specified, returns the position of the node at that index in the Scrollview instance's currently managed collection. |

***Deprecated***
**Returns**: `number` - The position of either the specified node, or the Scrollview's current Node,
**Returns**: <code>number</code> - The position of either the specified node, or the Scrollview's current Node,
in pixels translated.
<a name="module_FlexScrollView#setOptions"></a>
###flexScrollView.setOptions(options)
<a name="module_FlexScrollView--FlexScrollView#setOptions"></a>
####flexScrollView.setOptions(options) ⇒ <code>FlexScrollView</code>
Patches the FlexScrollView instance's options with the passed-in ones.

**Params**

- options `Object` - Configurable options (see ScrollController for all inherited options).
- \[pullToRefreshHeader\] `Renderable` - Pull to refresh renderable that is displayed when pulling down from the top.
- \[pullToRefreshFooter\] `Renderable` - Pull to refresh renderable that is displayed when pulling up from the bottom.
- \[leadingScrollView\] `FlexScrollView` - Leading scrollview into which input events are piped (see Tutorial).
- \[trailingScrollView\] `FlexScrollView` - Trailing scrollview into which input events are piped (see Tutorial).

**Returns**: `FlexScrollView` - this
<a name="module_FlexScrollView#sequenceFrom"></a>
###flexScrollView.sequenceFrom(node)
| Param | Type | Description |
| ----- | ---- | ----------- |
| options | <code>Object</code> | Configurable options (see ScrollController for all inherited options). |
| \[options.pullToRefreshHeader\] | <code>Renderable</code> | Pull to refresh renderable that is displayed when pulling down from the top. |
| \[options.pullToRefreshFooter\] | <code>Renderable</code> | Pull to refresh renderable that is displayed when pulling up from the bottom. |
| \[options.leadingScrollView\] | <code>FlexScrollView</code> | Leading scrollview into which input events are piped (see Tutorial). |
| \[options.trailingScrollView\] | <code>FlexScrollView</code> | Trailing scrollview into which input events are piped (see Tutorial). |

**Returns**: <code>FlexScrollView</code> - this
<a name="module_FlexScrollView--FlexScrollView#sequenceFrom"></a>
####flexScrollView.sequenceFrom(node) ⇒ <code>FlexScrollView</code>
Sets the data-source (alias for setDataSource).

This function is a shim provided for compatibility with the stock famo.us Scrollview.

**Params**
| Param | Type | Description |
| ----- | ---- | ----------- |
| node | <code>Array</code> \| <code>ViewSequence</code> | Either an array of renderables or a Famous viewSequence. |

- node `Array` | `ViewSequence` - Either an array of renderables or a Famous viewSequence.

**Returns**: `FlexScrollView` - this
<a name="module_FlexScrollView#getCurrentIndex"></a>
###flexScrollView.getCurrentIndex()
**Returns**: <code>FlexScrollView</code> - this
<a name="module_FlexScrollView--FlexScrollView#getCurrentIndex"></a>
####flexScrollView.getCurrentIndex() ⇒ <code>Number</code>
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
<a name="module_FlexScrollView#goToPage"></a>
###flexScrollView.goToPage(index)
**Returns**: <code>Number</code> - The current index of the ViewSequence
<a name="module_FlexScrollView--FlexScrollView#goToPage"></a>
####flexScrollView.goToPage(index) ⇒ <code>FlexScrollView</code>
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.
| Param | Type | Description |
| ----- | ---- | ----------- |
| index | <code>Number</code> | view-sequence index to go to. |

**Returns**: `FlexScrollView` - this
<a name="module_FlexScrollView#getOffset"></a>
###flexScrollView.getOffset()
**Returns**: <code>FlexScrollView</code> - this
<a name="module_FlexScrollView--FlexScrollView#getOffset"></a>
####flexScrollView.getOffset() ⇒ <code>number</code>
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,
**Returns**: <code>number</code> - The position of either the specified node, or the Scrollview's current Node,
in pixels translated.
<a name="module_FlexScrollView#showPullToRefresh"></a>
###flexScrollView.showPullToRefresh([footer])
<a name="module_FlexScrollView--FlexScrollView#showPullToRefresh"></a>
####flexScrollView.showPullToRefresh([footer]) ⇒ <code>FlexScrollView</code>
Shows the pulls-to-refresh renderable indicating that a refresh is in progress.

**Params**

- \[footer\] `Bool` - set to true to show pull-to-refresh at the footer (default: false).
| Param | Type | Description |
| ----- | ---- | ----------- |
| \[footer\] | <code>Bool</code> | set to true to show pull-to-refresh at the footer (default: false). |

**Returns**: `FlexScrollView` - this
<a name="module_FlexScrollView#hidePullToRefresh"></a>
###flexScrollView.hidePullToRefresh([footer])
**Returns**: <code>FlexScrollView</code> - this
<a name="module_FlexScrollView--FlexScrollView#hidePullToRefresh"></a>
####flexScrollView.hidePullToRefresh([footer]) ⇒ <code>FlexScrollView</code>
Hides the pull-to-refresh renderable in case it was visible.

**Params**
| Param | Type | Description |
| ----- | ---- | ----------- |
| \[footer\] | <code>Bool</code> | set to true to hide the pull-to-refresh at the footer (default: false). |

- \[footer\] `Bool` - set to true to hide the pull-to-refresh at the footer (default: false).

**Returns**: `FlexScrollView` - this
<a name="module_FlexScrollView#isPullToRefreshVisible"></a>
###flexScrollView.isPullToRefreshVisible([footer])
**Returns**: <code>FlexScrollView</code> - this
<a name="module_FlexScrollView--FlexScrollView#isPullToRefreshVisible"></a>
####flexScrollView.isPullToRefreshVisible([footer])
Get the visible state of the pull-to-refresh renderable.

**Params**

- \[footer\] `Bool` - set to true to get the state of the pull-to-refresh footer (default: false).
| Param | Type | Description |
| ----- | ---- | ----------- |
| \[footer\] | <code>Bool</code> | set to true to get the state of the pull-to-refresh footer (default: false). |

103 changes: 52 additions & 51 deletions docs/LayoutContext.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,51 @@
<a name="module_LayoutContext"></a>
#LayoutContext
##LayoutContext
LayoutContext is the interface for a layout-function to access
renderables in the data-source and set their size, position, tranformation, etc...

The `next`, `prev` and `get` functions return an opaque object which represents
the renderable that is to be layed out. To access the actual renderable, use the
`.renderNode` property of this opaque object.

<a name="exp_module_LayoutContext"></a>
##class: LayoutContext ⏏
**Members**

* [class: LayoutContext ⏏](#exp_module_LayoutContext)
* [layoutContext.size](#module_LayoutContext#size)
* [layoutContext.direction](#module_LayoutContext#direction)
* [layoutContext.scrollOffset](#module_LayoutContext#scrollOffset)
* [layoutContext.scrollStart](#module_LayoutContext#scrollStart)
* [layoutContext.scrollEnd](#module_LayoutContext#scrollEnd)
* [layoutContext.next()](#module_LayoutContext#next)
* [layoutContext.prev()](#module_LayoutContext#prev)
* [layoutContext.get(node)](#module_LayoutContext#get)
* [layoutContext.set(node, set)](#module_LayoutContext#set)
* [layoutContext.resolveSize(node)](#module_LayoutContext#resolveSize)

<a name="module_LayoutContext#size"></a>
###layoutContext.size

* [LayoutContext](#module_LayoutContext)
* [class: LayoutContext](#exp_module_LayoutContext--LayoutContext)
* _instance_
* [.size](#module_LayoutContext--LayoutContext#size)
* [.direction](#module_LayoutContext--LayoutContext#direction)
* [.scrollOffset](#module_LayoutContext--LayoutContext#scrollOffset)
* [.scrollStart](#module_LayoutContext--LayoutContext#scrollStart)
* [.scrollEnd](#module_LayoutContext--LayoutContext#scrollEnd)
* [.next()](#module_LayoutContext--LayoutContext#next) ⇒ <code>Object</code>
* [.prev()](#module_LayoutContext--LayoutContext#prev) ⇒ <code>Object</code>
* [.get(node)](#module_LayoutContext--LayoutContext#get) ⇒ <code>Object</code>
* [.set(node, set)](#module_LayoutContext--LayoutContext#set)
* [.resolveSize(node)](#module_LayoutContext--LayoutContext#resolveSize) ⇒ <code>Size</code>

<a name="exp_module_LayoutContext--LayoutContext"></a>
###class: LayoutContext ⏏
<a name="module_LayoutContext--LayoutContext#size"></a>
####layoutContext.size
{Property} Size in which to layout the renderables.

<a name="module_LayoutContext#direction"></a>
###layoutContext.direction
<a name="module_LayoutContext--LayoutContext#direction"></a>
####layoutContext.direction
{Property} Direction in which to layout the renderables (0 = X, 1 = Y).

<a name="module_LayoutContext#scrollOffset"></a>
###layoutContext.scrollOffset
<a name="module_LayoutContext--LayoutContext#scrollOffset"></a>
####layoutContext.scrollOffset
{Property} {Number} Scrolling offset at which to start laying out next/prev renderables.

<a name="module_LayoutContext#scrollStart"></a>
###layoutContext.scrollStart
<a name="module_LayoutContext--LayoutContext#scrollStart"></a>
####layoutContext.scrollStart
{Property} {Number} Top/left boundary to which to layout renderables (default: 0).

<a name="module_LayoutContext#scrollEnd"></a>
###layoutContext.scrollEnd
<a name="module_LayoutContext--LayoutContext#scrollEnd"></a>
####layoutContext.scrollEnd
{Property} {Number} Bottom/right boundary to which to continue laying out renderables.

<a name="module_LayoutContext#next"></a>
###layoutContext.next()
<a name="module_LayoutContext--LayoutContext#next"></a>
####layoutContext.next() ⇒ <code>Object</code>
Get the context-node for the next renderable in the data-source. When
the end of the data-source is reached, `undefined` is returned.
Use this function to enumerate the contents of a data-source that is
Expand All @@ -67,9 +68,9 @@ function MyLayoutFunction(context, options) {
}
```

**Returns**: `Object` - context-node or undefined
<a name="module_LayoutContext#prev"></a>
###layoutContext.prev()
**Returns**: <code>Object</code> - context-node or undefined
<a name="module_LayoutContext--LayoutContext#prev"></a>
####layoutContext.prev() ⇒ <code>Object</code>
Get the context-node for the previous renderable in the data-source. When
the start of the data-source is reached, `undefined` is returned.
Use this function to enumerate the contents of a data-source that is
Expand All @@ -92,9 +93,9 @@ function MyLayoutFunction(context, options) {
}
```

**Returns**: `Object` - context-node or undefined
<a name="module_LayoutContext#get"></a>
###layoutContext.get(node)
**Returns**: <code>Object</code> - context-node or undefined
<a name="module_LayoutContext--LayoutContext#get"></a>
####layoutContext.get(node) ⇒ <code>Object</code>
Get the context-node for a renderable with a specific id. This function
should be used to access data-sources which are key-value collections.
When a data-source is an Array or a ViewSequence, use `next()`.
Expand Down Expand Up @@ -167,13 +168,13 @@ var layoutController = new LayoutController({
});
```

**Params**

- node `Object` | `String` - context-node or node-id
| Param | Type | Description |
| ----- | ---- | ----------- |
| node | <code>Object</code> \| <code>String</code> | context-node or node-id |

**Returns**: `Object` - context-node or undefined
<a name="module_LayoutContext#set"></a>
###layoutContext.set(node, set)
**Returns**: <code>Object</code> - context-node or undefined
<a name="module_LayoutContext--LayoutContext#set"></a>
####layoutContext.set(node, set)
Set the size, origin, align, translation, scale, rotate, skew & opacity for a context-node.

**Overview of all supported properties:**
Expand All @@ -193,13 +194,13 @@ function MyLayoutFunction(context, options) {
}
```

**Params**
| Param | Type | Description |
| ----- | ---- | ----------- |
| node | <code>Object</code> \| <code>String</code> | context-node or node-id |
| set | <code>Object</code> | properties: size, origin, align, translate, scale, rotate, skew & opacity |

- node `Object` | `String` - context-node or node-id
- set `Object` - properties: size, origin, align, translate, scale, rotate, skew & opacity

<a name="module_LayoutContext#resolveSize"></a>
###layoutContext.resolveSize(node)
<a name="module_LayoutContext--LayoutContext#resolveSize"></a>
####layoutContext.resolveSize(node) ⇒ <code>Size</code>
Resolve the size of a context-node by accessing the `getSize` function
of the renderable.

Expand Down Expand Up @@ -230,8 +231,8 @@ is unknown. In this case, the LayoutController will cause a second
reflow of the layout the next render-cycle, ensuring that the renderables
are layed out as expected.

**Params**

- node `Object` | `String` - context-node, node-id or array-element
| Param | Type | Description |
| ----- | ---- | ----------- |
| node | <code>Object</code> \| <code>String</code> | context-node, node-id or array-element |

**Returns**: `Size` - size of the node
**Returns**: <code>Size</code> - size of the node
Loading

0 comments on commit 75aaba8

Please sign in to comment.