Function
Static Public Summary | ||
public |
Function that handles event flow, negotiating with the interpreter, and dispatcher. |
|
public |
dispatcher(binding: Binding, data: Object, events: Array) Emits data at the target element if available, and bubbles up from the target to the parent until the document has been reached. |
|
public |
interpreter(bindings: Array, event: Object, state: Object): Object | null Receives an event and an array of Bindings (element -> gesture handler) to determine what event will be emitted. |
Static Public
public arbiter(event: Event, region: Object) source
import arbiter from 'zingtouch/src/core/arbiter.js'
Function that handles event flow, negotiating with the interpreter, and dispatcher.
- Receiving all touch events in the window.
- Determining which gestures are linked to the target element.
- Negotiating with the Interpreter what event should occur.
- Sending events to the dispatcher to emit events to the target.
public dispatcher(binding: Binding, data: Object, events: Array) source
import dispatcher from 'zingtouch/src/core/dispatcher.js'
Emits data at the target element if available, and bubbles up from the target to the parent until the document has been reached. Called from the arbiter.
public interpreter(bindings: Array, event: Object, state: Object): Object | null source
import interpreter from 'zingtouch/src/core/interpreter.js'
Receives an event and an array of Bindings (element -> gesture handler) to determine what event will be emitted. Called from the arbiter.
Return:
Object | null | Returns an object containing a binding and metadata, or null if a gesture will not be emitted. |