mirror of
https://github.com/konvajs/konva.git
synced 2025-09-22 20:14:01 +08:00
the Sprite afterFrame function should only execute once
This commit is contained in:
@@ -70,6 +70,8 @@ Kinetic.Sprite.prototype = {
|
||||
that._updateIndex();
|
||||
if(that.afterFrameFunc && index === that.afterFrameIndex) {
|
||||
that.afterFrameFunc();
|
||||
delete that.afterFrameFunc;
|
||||
delete that.afterFrameIndex;
|
||||
}
|
||||
}, 1000 / this.attrs.frameRate);
|
||||
|
||||
|
Reference in New Issue
Block a user