Global

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
allow Array.<String> <nullable>

List of events handled by this Controller. Defaults to ['click','change','input']

enabled Boolean <nullable>

Flag that allows events to trigger the 'on' callback. Defaults to 'true'

view Element

Reference to the 'view' Element whom this Controller is attached.

on ControllerCallback

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_notification ControllerNotification

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
type String <nullable>

Type of the event that generated this notification. Can be 'empty' if called from 'Suit.controller.dispatch'.

src Event <nullable>

Reference to the event which generated this notification. Can be 'null' if called from 'Suit.controller.dispatch'.

view String <nullable>

String path to the view/Element where this event was generated.

path String <nullable>

String containing the complete event path. It can be either 'path.to.event@type' or only 'path.to.event'.

data Object <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_progress Number

Animation progress inside the range [0.0,1.0].

Returns:
Type Description
Number
  • Returns the mapped progress inside the range [0.0,1.0].

LapelComponentObject

Lapel Web Component.

Properties:
Name Type Argument Description
tag String

HTML tag that defines this component. Lapel will either replace or insert the 'src' contents based on this tag.

src String

HTML content that will either replace or fill the Element.

inner Boolean <nullable>

Flag that tells if 'src' will replace the tag or fill it. Defaults to true.

init LapelComponentCallback

Method that handles this component initialization. Setup your logic on this callback.

LapelComponentCallbackObject

Lapel Component Init Callback.

Properties:
Name Type Description
element Element | 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
target Object

Target object being animated.

property String

Property name.

value Object

Final value.

easing Easing

Animation easing.

delay Number

Delay in seconds.

duration Number

Duration in seconds.

elapsed Number

Elapsed time of execution in seconds.

progress Number

Animation progress in the range [0.0,1.0].

oncomplete String | function <nullable>

On complete callback. Can be either a function or Suitnotification string.

runOnBackground Boolean <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_data Object

Data being loaded or null (in case of error or progress).

p_progress Number

Download or Upload progress ('upload' values have the range [-1.0,0.0) )

p_event Event 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_item Object

Current item.

p_index Number

Current index.

p_length Number

List length.

ServantNodeObject

Servant node. Base object that runs on Servant's update pool.

Properties:
Name Type Argument Description
runOnBackground Boolean <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_node ServantNode | ServantUpdateNode

Executing node.

ServantUpdateNodeObject

Update node. Node used for more complex update operations. It holds more time information.

Properties:
Name Type Argument Description
progress Number

Execution progress, in the range [0;1]

duration Number

Duration in seconds of the execution.

elapsed Number

Current running time in seconds. If the chosen 'delay' is positive, 'elapsed' starts negative.

runOnBackground Boolean <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_target Element

Current element being visited.

p_args Object 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_result Object

Data returned from the operation.

p_error Error 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_key String

Key string.

p_value Object

Value.

p_index Number

Index of the iteration. If finished or any error occurred returns negative.

Returns:
Type Description
Boolean
  • If false is returned the iteration stops.
comments powered by Disqus