mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Fix Tween#then()
documentation.
Bug introduced in 9c684091f4
: example
variable was renamed from `item` to `circle` in declaration but later
calls were still done with `item`.
This commit is contained in:
parent
a7c2fb3ddf
commit
449c5c3e6d
1 changed files with 8 additions and 4 deletions
|
@ -147,15 +147,19 @@ var Tween = Base.extend(Emitter, /** @lends Tween# */{
|
||||||
* completes
|
* completes
|
||||||
* @return {Tween}
|
* @return {Tween}
|
||||||
*
|
*
|
||||||
* @example {@paperscript} // Tweens chaining: var circle = new
|
* @example {@paperscript}
|
||||||
* Path.Circle({center: view.center, radius: 40, fillColor: 'blue'
|
* // Tweens chaining:
|
||||||
|
* var circle = new Path.Circle({
|
||||||
|
* center: view.center,
|
||||||
|
* radius: 40,
|
||||||
|
* fillColor: 'blue'
|
||||||
* });
|
* });
|
||||||
* // Tween color from blue to red.
|
* // Tween color from blue to red.
|
||||||
* var tween = item.tweenTo({ fillColor: 'red' }, 2000);
|
* var tween = circle.tweenTo({ fillColor: 'red' }, 2000);
|
||||||
* // When the first tween completes...
|
* // When the first tween completes...
|
||||||
* tween.then(function() {
|
* tween.then(function() {
|
||||||
* // ...tween color back to blue.
|
* // ...tween color back to blue.
|
||||||
* item.tweenTo({ fillColor: 'blue' }, 2000);
|
* circle.tweenTo({ fillColor: 'blue' }, 2000);
|
||||||
* });
|
* });
|
||||||
*/
|
*/
|
||||||
then: function(then) {
|
then: function(then) {
|
||||||
|
|
Loading…
Reference in a new issue