mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
Merge pull request #480 from mrkeldon/master
Add onReset handler for Tweens
This commit is contained in:
10
src/Tween.js
10
src/Tween.js
@@ -76,6 +76,9 @@
|
||||
}
|
||||
|
||||
this.reset();
|
||||
|
||||
// add Reset event handler after initial reset is fired
|
||||
this.onReset = config.onReset;
|
||||
};
|
||||
|
||||
// start/diff object = attrs.nodeId.tweenId.attr
|
||||
@@ -172,6 +175,11 @@
|
||||
that.onFinish();
|
||||
}
|
||||
};
|
||||
tween.onReset = function() {
|
||||
if (that._isLastTween(tween) && that.onReset) {
|
||||
that.onReset();
|
||||
}
|
||||
};
|
||||
},
|
||||
/**
|
||||
* play
|
||||
@@ -596,4 +604,4 @@
|
||||
return c * t / d + b;
|
||||
}
|
||||
};
|
||||
})();
|
||||
})();
|
||||
|
Reference in New Issue
Block a user