A transition represents a change from an initial state to an end state over a duration of time.
This transition class is meant to be extended by other implementations that require types of animations or changes in a value over time. It is not typically called directly.
One such implementation of a Transition is the TransitionSelection which transitions a set of entities in a DisplaySelection.
The source of the transition. A source is an object that acts as the source for transition. It serves as the this argument for an functions being called such as the animator, tick, and atEnd functions.
an iterable of items to be transitioned.
Ensures that this transition does not begin until the given future completes.
this transition
Adds an animator function with a name. These animator functions are called on each tick of the transition.
The name serves as a key to ensure that no two transitions conflict with each other.
the name associated with this animator function. The name serves as a key to prevent animator functions from conflicting
Sets or gets the function to execute when this transition completes
returns this transition if setting the atEnd function, else the current atEnd function is returned
Sets or gets the delay for this transition.
The delay can be either a number or a function that returns a number for each individual item in this transition.
If no delay is explicitly set, the default delay for transitions is used.
returns this transition if setting the delay, else the current delay is returned
Sets or gets the duration for this transition.
The duration can be either a number or a function that returns a number for each individual item in this transition.
If no duration is explicitly set, the default duration for transitions is used.
returns this transition if setting the duration, else the current duration is returned
Sets or gets the easing function to be used on this Transition.
the easing function used for this transition
this Transition if setting the easing function or the current Easing function
Lends the methods of this Transition to another object. Because many classes depend on animation and we can only extend once, this is a handy way to offer the methods of transition to another object that needs them for managing animations
the object to lend the methods to
this transition
Sets or gets the function to execute on each 'tick' or 'step' of this transition
returns this transition if setting the tick function, else the current tick function is returned
Binds a this argument to the future which will be passed to listeners when this Future is called.
returns this future
Cancels this future, causing it to go into the Future.CANCELLED state.
the optional value that will be passed to this futures cancel listeners
returns this Future
Fails this future, with the given reason. Users should never call this method directly.
returns this future
Fulfills this future which marks the future as being successfully completed.
an optional value that was created by the future.
Register a function to be called if this Future completes. The function will be called with the value of the future as the argument.
Note this API does not currently support removing the listener.
this future
Register a function to be called if this Future fails.
Note this API does not currently support removing the listener.
this future
Register a function to be called as progress events occur on this Future. The function will be called with the value of the progress as the argument.
Note this API does not currently support removing the listener.
this future
Progresses this future, with the given arguments. Users should never call this method directly.
optional value that will be passed this future's progress listeners
returns this future
Registers a set of listeners that are called as this future progresses. And returns a new future that is fulfilled by the return value of the oncomplete handler. In this way, Futures can be chained.
the function to call when this Future is complete.
the function to call if this Future encounters an error. This will only be called one or zero times.
the function to call as this Future progresses. This is not guaranteed to be called.
thinkmap.async.later(function() { return 5; },2000)
.then(function(x) { return v + 2; })
.then(function(v) { alert(v); });
Add a listener to this EventSource
the name of the event to listen for
the callback to add
this eventsource
Dispatch an event from this EventSource, supplying arguments to the listeners via an Array, rather than var-args.
the name of the event to dispatch
this EventSource
Dispatch an event from this EventSource
the name of the event to dispatch
optional arguments sent to the event listeners
this EventSource
Fire an event from this EventSource
the name of the event to dispatch
optional arguments sent to the event listeners
this EventSource
Remove a listener from this EventSource
the name of the event to remove the listener for
the callback to remove
this eventsource
Add a listener to this EventSource
the name of the event to listen for
the callback
this eventsource
Add a listener to this EventSource, which will be called at most once and will be removed the first time the given event fires.
the name of the event to listen for
the callback to add
this eventsource
Remove a listener from this EventSource
the name of the event to remove the listener for
the callback to remove
this eventsource
fired when this future completes. The arguments to this event are the arguments used to fulfill (complete) this future
fired when this future is cancelled. The arguments to this event are the arguments passed to the cancel method of this future
fired when this future encounters an error. The arguments to this event are the error which caused this future from being unable to complete.
fired when this future has been notified of progress. The arguments to this event are the arguments passed to this futures progress method.