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:
sasensi 2018-12-03 15:04:22 +01:00
parent a7c2fb3ddf
commit 449c5c3e6d

View file

@ -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) {