- 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
SequentialLayout
SequentialLayout will lay out a collection of renderables sequentially in the specified direction.
Overview
Options
direction
Methods
getSize
sequenceFrom
setOptions
setOutputFunction
SequentialLayout(options)
Constructor Parameters
options
Options
An object of configurable options.
direction
Number
Using the direction helper found in the famous Utility module, this option will lay out the SequentialLayout instance's renderables either horizontally (x) or vertically (y). Utility's direction is essentially either zero (X) or one (Y), so feel free to just use integers as well.
Methods
getSize()
Returns the width and the height of the SequentialLayout instance.
Returns
Array
A two value array of the SequentialLayout instance's current width and height (in that order).
sequenceFrom(items)
Sets the collection of renderables under the SequentialLayout instance's control.
Parameters
items
Array|ViewSequence
Either an array of renderables or a Famous viewSequence.
setOptions(options)
Patches the SequentialLayout instance's options with the passed-in ones.
Parameters
options
Options
An object of configurable options for the SequentialLayout instance.
setOutputFunction(outputFunction)
setOutputFunction is used to apply a user-defined output transform on each processed renderable. For a good example, check out SequentialLayout's own DEFAULT_OUTPUT_FUNCTION in the code.
Parameters
outputFunction
Function
An output processer for each renderable in the SequentialLayout instance.
render()Private
Return the id of the component
Returns
Number
id of the SequentialLayout
commit(parentSpec)Private
Generate a render spec from the contents of this component.
Parameters
parentSpec
Object
parent render spec
Returns
Object
Render spec for this component