φ 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

OptionsManager

A collection of methods for setting options which can be extended onto other classes. **** WARNING **** You can only pass through objects that will compile into valid JSON. Valid options: Strings, Arrays, Objects, Numbers, Nested Objects, Nested Arrays. This excludes: Document Fragments, Functions

Overview

Options
Methods
OptionsManager.patch
patch
setOptions
key
get
getOptions
set
on
removeListener
pipe
unpipe

OptionsManager(value)

Constructor Parameters

value

Object

options dictionary

Methods

OptionsManager.patch(source, data)Static

Create options manager from source dictionary with arguments overriden by patch dictionary.

Parameters
source
Object
source arguments
data
...Object
argument additions and overwrites
Returns
Object
source object

patch(arguments)

Create OptionsManager from source with arguments overriden by patches. Triggers 'change' event on this object's event handler if the state of the OptionsManager changes as a result.

Parameters
arguments
...Object
list of patch objects
Returns
OptionsManager
this

setOptions()

Alias for patch

key(identifier)

Return OptionsManager based on sub-object retrieved by key

Parameters
identifier
String
key
Returns
OptionsManager
new options manager with the value

get(key)

Look up value by key or get the full options hash

Parameters
key
String
key
Returns
Object
associated object or full options hash

getOptions()

Alias for get

set(key, value)

Set key to value. Outputs 'change' event if a value is overwritten.

Parameters
key
String
key string
value
Object
value object
Returns
OptionsManager
new options manager based on the value object

on(type, handler)

Bind a callback function to an event type handled by this object.

Parameters
type
String
event type key (for example, 'change')
handler
Function(string, Object)
callback
Returns
EventHandler
this

removeListener(type, handler)

Unbind an event by type and handler. This undoes the work of "on".

Parameters
type
String
event type key (for example, 'change')
handler
Function
function object to remove
Returns
EventHandler
internal event handler object (for chaining)

pipe(target)

Add event handler object to set of downstream handlers.

Parameters
target
EventHandler
event handler target object
Returns
EventHandler
passed event handler

unpipe(target)

Remove handler object from set of downstream handlers. Undoes work of "pipe"

Parameters
target
EventHandler
target handler object
Returns
EventHandler
provided target
Branding Terms Privacy Jobs © Famous Industries, Inc. 2015