Members
-
PI2
-
Easing Equations by Robert Penner [http://robertpenner.com/easing/]
More information [http://easings.net/]
Type Definitions
-
ControllerObject
-
SuitJS Controller.
Properties:
Name Type Argument Description allowArray.<String> <nullable>
List of events handled by this Controller. Defaults to ['click','change','input']
enabledBoolean <nullable>
Flag that allows events to trigger the 'on' callback. Defaults to 'true'
viewElement Reference to the 'view' Element whom this Controller is attached.
onControllerCallback Method that handles the 'view' and global notifications.
-
ControllerCallback(p_notification){String|Array}
-
Callback called when a notification arrives on a Controller.
Name Type Description p_notificationControllerNotification Notification containing the call information.
Returns:
Type Description String | Array - A new notification String or a pair ["notification", {data}] (both will invoke Suit.controller.dispatch('notification',data))
-
ControllerNotificationObject
-
Controller Notification.
Properties:
Name Type Argument Description typeString <nullable>
Type of the event that generated this notification. Can be 'empty' if called from 'Suit.controller.dispatch'.
srcEvent <nullable>
Reference to the event which generated this notification. Can be 'null' if called from 'Suit.controller.dispatch'.
viewString <nullable>
String path to the view/Element where this event was generated.
pathString <nullable>
String containing the complete event path. It can be either 'path.to.event@type' or only 'path.to.event'.
dataObject <nullable>
Extra data that can be attached to this notification. More common on hand made dispatches.
-
Easing(p_progress){Number}
-
Function that transforms the animation progress and eases the rate of change of the animated value.
Name Type Description p_progressNumber Animation progress inside the range
[0.0,1.0].Returns:
Type Description Number - Returns the mapped progress inside the range
[0.0,1.0].
- Returns the mapped progress inside the range
-
LapelComponentObject
-
Lapel Web Component.
Properties:
Name Type Argument Description tagString HTML tag that defines this component. Lapel will either replace or insert the 'src' contents based on this tag.
srcString HTML content that will either replace or fill the Element.
innerBoolean <nullable>
Flag that tells if 'src' will replace the tag or fill it. Defaults to true.
initLapelComponentCallback Method that handles this component initialization. Setup your logic on this callback.
-
LapelComponentCallbackObject
-
Lapel Component Init Callback.
Properties:
Name Type Description elementElement | Array.<Element> Created DOM Element. Allows to do extra operations using the new created component reference. If the 'src' of the component is made of several tags an Array is returned.
-
ReelAnimationObject
-
Animation node.
Properties:
Name Type Argument Description targetObject Target object being animated.
propertyString Property name.
valueObject Final value.
easingEasing Animation easing.
delayNumber Delay in seconds.
durationNumber Duration in seconds.
elapsedNumber Elapsed time of execution in seconds.
progressNumber Animation progress in the range
[0.0,1.0].oncompleteString | function <nullable>
On complete callback. Can be either a function or
Suitnotification string.runOnBackgroundBoolean <nullable>
Flag that indicates this node will keep running when the tab isn't focused.
update()function Execution method.
-
RequestCallback(p_data, p_progress, p_event)
-
Callback called when a created request updates its progress.
Name Type Description p_dataObject Data being loaded or null (in case of error or progress).
p_progressNumber Download or Upload progress ('upload' values have the range [-1.0,0.0) )
p_eventEvent nullable Reference to the XmlHttpRequest event that generated the call.
-
ServantIterationCallback(p_item, p_index, p_length)
-
Callback called when the view module is traversing its target.
Name Type Description p_itemObject Current item.
p_indexNumber Current index.
p_lengthNumber List length.
-
ServantNodeObject
-
Servant node. Base object that runs on Servant's update pool.
Properties:
Name Type Argument Description runOnBackgroundBoolean <nullable>
Flag that indicates this node will keep running when the tab isn't focused.
update()function Execution method.
-
ServantUpdateCallback(p_node)
-
Callback called when the ServantNode is updated.
Name Type Description p_nodeServantNode | ServantUpdateNode Executing node.
-
ServantUpdateNodeObject
-
Update node. Node used for more complex update operations. It holds more time information.
Properties:
Name Type Argument Description progressNumber Execution progress, in the range [0;1]
durationNumber Duration in seconds of the execution.
elapsedNumber Current running time in seconds. If the chosen 'delay' is positive, 'elapsed' starts negative.
runOnBackgroundBoolean <nullable>
Flag that indicates this node will keep running when the tab isn't focused.
update()function Execution method.
-
ViewTraverseCallback(p_target, p_args){Boolean}
-
Callback called when the view module is traversing its target.
Name Type Description p_targetElement Current element being visited.
p_argsObject nullable Extra data passed in the original 'traverse' call.
Returns:
Type Description Boolean - Returning 'false' will stop the traversal for the current node.
-
WalletCallback(p_result, p_error)
-
Callback called when the LocalForage operations is finished.
Name Type Description p_resultObject Data returned from the operation.
p_errorError nullable Error handler if any.
-
WalletIterationCallback(p_key, p_value, p_index){Boolean}
-
Callback called when the LocalForage operations is finished.
Name Type Description p_keyString Key string.
p_valueObject Value.
p_indexNumber Index of the iteration. If finished or any error occurred returns negative.
Returns:
Type Description Boolean - If
falseis returned the iteration stops.
- If