- 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
EventArbiter
A switch which wraps several event destinations and redirects received events to at most one of them. Setting the 'mode' of the object dictates which one of these destinations will receive events.
Overview
Options
Methods
setMode
forMode
emit
EventArbiter(startMode)
Constructor Parameters
startMode
Number | string
initial setting of switch,
Methods
setMode(mode)
Set switch to this mode, passing events to the corresponding EventHandler. If mode has changed, emits 'change' event, emits 'unpipe' event to the old mode's handler, and emits 'pipe' event to the new mode's handler.
Parameters
mode
String | number
indicating which event handler to send to.
forMode(mode)
Return the existing EventHandler corresponding to this mode, creating one if it doesn't exist.
Parameters
mode
String | number
mode to which this eventHandler corresponds
Returns
EventHandler
eventHandler corresponding to this mode
emit(eventType, event)
Trigger an event, sending to currently selected handler, if it is listening for provided 'type' key.
Parameters
eventType
String
event type key (for example, 'click')
event
Object
event data
Returns
EventHandler
this