From 449c5c3e6d457e9d7523bff86cf5e7a4757e6088 Mon Sep 17 00:00:00 2001 From: sasensi Date: Mon, 3 Dec 2018 15:04:22 +0100 Subject: [PATCH] Fix `Tween#then()` documentation. Bug introduced in 9c684091f42675043e0135ae31a4155b96901b5a: example variable was renamed from `item` to `circle` in declaration but later calls were still done with `item`. --- src/anim/Tween.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/anim/Tween.js b/src/anim/Tween.js index d3da643e..d7e04c86 100644 --- a/src/anim/Tween.js +++ b/src/anim/Tween.js @@ -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) {