mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-28 17:02:24 -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
|
||||
* @return {Tween}
|
||||
*
|
||||
* @example {@paperscript} // Tweens chaining: var circle = new
|
||||
* Path.Circle({center: view.center, radius: 40, fillColor: 'blue'
|
||||
* @example {@paperscript}
|
||||
* // Tweens chaining:
|
||||
* var circle = new Path.Circle({
|
||||
* center: view.center,
|
||||
* radius: 40,
|
||||
* fillColor: 'blue'
|
||||
* });
|
||||
* // 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...
|
||||
* tween.then(function() {
|
||||
* // ...tween color back to blue.
|
||||
* item.tweenTo({ fillColor: 'blue' }, 2000);
|
||||
* circle.tweenTo({ fillColor: 'blue' }, 2000);
|
||||
* });
|
||||
*/
|
||||
then: function(then) {
|
||||
|
|
Loading…
Reference in a new issue