update docs

This commit is contained in:
Anton Lavrenov
2020-07-27 10:16:17 -05:00
parent 0206974a70
commit c135a91c60

View File

@@ -158,11 +158,15 @@ class TweenEngine {
* @example * @example
* // instantiate new tween which fully rotates a node in 1 second * // instantiate new tween which fully rotates a node in 1 second
* var tween = new Konva.Tween({ * var tween = new Konva.Tween({
* // list of tween specific properties
* node: node, * node: node,
* rotationDeg: 360,
* duration: 1, * duration: 1,
* easing: Konva.Easings.EaseInOut, * easing: Konva.Easings.EaseInOut,
* onFinish: () => console.log('finished') * onUpdate: () => console.log('node attrs updated')
* onFinish: () => console.log('finished'),
* // set new values for any attributes of a passed node
* rotation: 360,
* fill: 'red'
* }); * });
* *
* // play tween * // play tween
@@ -445,7 +449,7 @@ export class Tween {
if (this.onUpdate) { if (this.onUpdate) {
this.onUpdate.call(this); this.onUpdate.call(this);
} }
} };
} }
/** /**
* play * play
@@ -539,9 +543,8 @@ export class Tween {
* circle.to({ * circle.to({
* x : 50, * x : 50,
* duration : 0.5, * duration : 0.5,
* onFinish: () => { * onUpdate: () => console.log('props updated'),
* console.log('finished'); * onFinish: () => console.log('finished'),
* }
* }); * });
*/ */
Node.prototype.to = function (params) { Node.prototype.to = function (params) {