DrawerLayout
A layout which will arrange two renderables: a featured content, and a concealed drawer. The drawer can be revealed from any side of the content (left, top, right, bottom) by dragging the content. A @link{Sync} must be piped in to recieve user input. Events: broadcasts: 'open', 'close' listens to: 'update', 'end'
DrawerLayout(options)
Constructor Parameters
options
Object
An object of configurable options
side
Number
The side of the content the drawer is placed. Choice of DrawerLayout.SIDES.LEFT/RIGHT/TOP/BOTTOM
drawerLength
Number
The default length of the drawer
velocityThreshold
Number
The velocity threshold to trigger a toggle
positionThreshold
Number
The position threshold to trigger a toggle
transition
Boolean|Object
The toggle transition
Methods
Show Private Methods
setOptions(options)
Patches the DrawerLayout instance's options with the passed-in ones.
Parameters
open(transition, callback)
Reveals the drawer with a transition Emits an 'open' event when an opening transition has been committed to.
Parameters
transition
Boolean|Object
transition definition
callback
Function
callback
close(transition, callback)
Conceals the drawer with a transition Emits a 'close' event when an closing transition has been committed to.
Parameters
transition
Boolean|Object
transition definition
callback
Function
callback
setPosition(position, transition, callback)
Sets the position in pixels for the content's displacement
Parameters
transition
Boolean|Object
transition definition
callback
Function
callback
getPosition()
Gets the position in pixels for the content's displacement
Returns
Number
position position
setProgress(progress, transition, callback)
Sets the progress (between 0 and 1) for the content's displacement
Parameters
transition
Boolean|Object
transition definition
callback
Function
callback
getProgress()
Gets the progress (between 0 and 1) for the content's displacement
Returns
Number
position position
toggle(transition)
Toggles between open and closed states
Parameters
transition
Boolean|Object
transition definition
reset(transition)
Resets to last state of being open or closed
Parameters
transition
Boolean|Object
transition definition
isOpen()
Returns if drawer is committed to being open or closed
Returns
Boolean
render()Private
Generates a Render Spec from the contents of this component
Returns
Spec