a small bit of animation code cleanup

This commit is contained in:
Eric Rowell 2013-01-07 19:38:16 -08:00
parent 590889f898
commit d0148a50ac
2 changed files with 3 additions and 4 deletions

View File

@ -60,9 +60,8 @@
this._handleAnimation();
};
Kinetic.Animation._removeAnimation = function(anim) {
var id = anim.id;
var animations = this.animations;
for(var n = 0; n < animations.length; n++) {
var id = anim.id, animations = this.animations, len = animations.length;
for(var n = 0; n < len; n++) {
if(animations[n].id === id) {
this.animations.splice(n, 1);
break;

View File

@ -174,7 +174,7 @@ Test.Modules.MANUAL = {
anim.start();
setTimeout(function() {
//anim.stop();
anim.stop();
}, 3000);
},
'ANIMATION - test multiple animations': function(containerId) {