Class wink.ux.Inertia
The Inertia component provides, through collaboration with a Movement Tracker, datas calculated from the inertia of a movement. The user needs to create and pass a movement tracker object to the Inertia, and to listen the end of calculations.
- Defined in: inertia.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
wink.ux.Inertia(properties)
|
| Compatibility list | Supported platforms / browsers |
|---|---|
|
iOS2, iOS3, iOS4, iOS5, iOS6, Android 1.5, Android 2.1, Android 2.2, Android 2.3, Android 3.0, Android 3.1, Android 4.0, BlackBerry 6, BlackBerry 7, Bada 1.0, Windows Phone 8
|
Method Summary
Class Detail
wink.ux.Inertia(properties)
var node = wink.byId("nodeId");
var movementtracker = new wink.ux.MovementTracker({ target: node });
var inertia = new wink.ux.Inertia({ movementtracker: movementtracker });
wink.subscribe('/inertia/events/inertiacomputed', { context: window, method: 'displaySpeed' });
- Parameters:
- {object} properties
- The properties object
- {wink.ux.MovementTracker} properties.movementtracker
- The movement tracker that provides datas to interpret
- Requires:
- wink.ux.MovementTracker
- See:
- Test page
Field Detail
{integer}
uId
Unique identifier
Method Detail
-
destroy()Destroys the component
Event Detail
/inertia/events/inertiacomputed
inertia is computed
- Parameters:
- {object} param
- The parameters object
- {wink.ux.Inertia} param.publisher
- Identifies the Inertia component itself in order, for the caller, to check whether the event relates to it
- {object} param.movement
- The original movement supplemented by inertia datas
- {wink.ux.Event} param.uxEvent
- The original end event of the movement
- {HTMLElement} param.target
- The target of the movement