φ Famo.us University Famo.us/Angular Docs Help Blog Download
  • core
  • Context
  • ElementAllocator
  • ElementOutput
  • Engine
  • Entity
  • EventEmitter
  • EventHandler
  • Group
  • Modifier
  • OptionsManager
  • RenderNode
  • Scene
  • SpecParser
  • Transform
  • View
  • ViewSequence
  • events
  • EventArbiter
  • EventFilter
  • EventMapper
  • inputs
  • Accumulator
  • GenericSync
  • MouseSync
  • PinchSync
  • RotateSync
  • ScaleSync
  • ScrollSync
  • TouchSync
  • TouchTracker
  • TwoFingerSync
  • math
  • Matrix
  • Quaternion
  • Random
  • Utilities
  • Vector
  • modifiers
  • Draggable
  • Fader
  • ModifierChain
  • StateModifier
  • physics
  • PhysicsEngine
  • physics/bodies
  • Body
  • Circle
  • Particle
  • Rectangle
  • physics/constraints
  • Surface
  • Collision
  • Constraint
  • Curve
  • Distance
  • Snap
  • Wall
  • Walls
  • physics/forces
  • Drag
  • Force
  • Repulsion
  • RotationalDrag
  • RotationalSpring
  • Spring
  • VectorField
  • physics/integrators
  • SymplecticEuler
  • surfaces
  • CanvasSurface
  • ContainerSurface
  • ImageSurface
  • InputSurface
  • TextareaSurface
  • VideoSurface
  • transitions
  • CachedMap
  • Easing
  • MultipleTransition
  • SnapTransition
  • SpringTransition
  • Transitionable
  • TransitionableTransform
  • TweenTransition
  • WallTransition
  • utilities
  • KeyCodes
  • Timer
  • Utility
  • views
  • ContextualView
  • Deck
  • DrawerLayout
  • EdgeSwapper
  • FlexibleLayout
  • Flipper
  • GridLayout
  • HeaderFooterLayout
  • Lightbox
  • RenderController
  • ScrollContainer
  • Scroller
  • Scrollview
  • SequentialLayout
  • widgets
  • NavigationBar
  • TabBar

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'

Overview

Options
side
drawerLength
velocityThreshold
positionThreshold
transition
Methods
setOptions
open
close
setPosition
getPosition
setProgress
getProgress
toggle
reset
isOpen

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

setOptions(options)

Patches the DrawerLayout instance's options with the passed-in ones.

Parameters
options
Object
options

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
position
Number
position
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
progress
Number
position
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
Branding Terms Privacy Jobs © Famous Industries, Inc. 2015