mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
the Sprite afterFrame function should only execute once
This commit is contained in:
parent
f08701e347
commit
5e6c8774e8
2
dist/kinetic-core.js
vendored
2
dist/kinetic-core.js
vendored
@ -5391,6 +5391,8 @@ Kinetic.Sprite.prototype = {
|
|||||||
that._updateIndex();
|
that._updateIndex();
|
||||||
if(that.afterFrameFunc && index === that.afterFrameIndex) {
|
if(that.afterFrameFunc && index === that.afterFrameIndex) {
|
||||||
that.afterFrameFunc();
|
that.afterFrameFunc();
|
||||||
|
delete that.afterFrameFunc;
|
||||||
|
delete that.afterFrameIndex;
|
||||||
}
|
}
|
||||||
}, 1000 / this.attrs.frameRate);
|
}, 1000 / this.attrs.frameRate);
|
||||||
|
|
||||||
|
2
dist/kinetic-core.min.js
vendored
2
dist/kinetic-core.min.js
vendored
File diff suppressed because one or more lines are too long
@ -70,6 +70,8 @@ Kinetic.Sprite.prototype = {
|
|||||||
that._updateIndex();
|
that._updateIndex();
|
||||||
if(that.afterFrameFunc && index === that.afterFrameIndex) {
|
if(that.afterFrameFunc && index === that.afterFrameIndex) {
|
||||||
that.afterFrameFunc();
|
that.afterFrameFunc();
|
||||||
|
delete that.afterFrameFunc;
|
||||||
|
delete that.afterFrameIndex;
|
||||||
}
|
}
|
||||||
}, 1000 / this.attrs.frameRate);
|
}, 1000 / this.attrs.frameRate);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user