φ 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

ElementOutput

A base class for viewable content and event targets inside a Famo.us application, containing a renderable document fragment. Like an HTML div, it can accept internal markup, properties, classes, and handle events.

Overview

Options
Methods
on
removeListener
emit
pipe
unpipe

ElementOutput(element)

Constructor Parameters

element

Node

document parent of this container

Methods

on(type, fn)

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

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

removeListener(type, fn)

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

Parameters
type
String
event type key (for example, 'click')
fn
Function(string, Object)
handler

emit(type, event)

Trigger an event, sending to all downstream handlers listening for provided 'type' key.

Parameters
type
String
event type key (for example, 'click')
event
Object
event data
Returns
EventHandler
this

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

render()Private

Return spec for this surface. Note that for a base surface, this is simply an id.

Returns
Object
render spec for this surface (spec id)

_formatCSSTransform(m)Private

Return a Matrix's webkit css representation to be used with the CSS3 -webkit-transform style. Example: -webkit-transform: matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,716,243,0,1)

Parameters
m
FamousMatrix
matrix
Returns
String
matrix3d CSS style representation of the transform

setMatrix(element, matrix)PrivateStatic

Directly apply given FamousMatrix to the document element as the appropriate webkit CSS style.

Parameters
element
Element
document element
matrix
FamousMatrix

commit(context)Private

Apply changes from this component to the corresponding document element. This includes changes to classes, styles, size, content, opacity, origin, and matrix transforms.

Parameters
context
Context
commit context

attach(target)Private

Place the document element that this component manages into the document.

Parameters
target
Node
document parent of this container

detach()Private

Remove any contained document content associated with this surface from the actual document.

Branding Terms Privacy Jobs © Famous Industries, Inc. 2015