mirror of
https://github.com/konvajs/konva.git
synced 2025-12-04 19:08:24 +08:00
added throttling unit tests
This commit is contained in:
@@ -40,7 +40,7 @@ Kinetic.GlobalObject = {
|
||||
}
|
||||
},
|
||||
_addAnimation: function(anim) {
|
||||
anim.id = Kinetic.GlobalObject.animIdCounter++;
|
||||
anim.id = this.animIdCounter++;
|
||||
this.animations.push(anim);
|
||||
},
|
||||
_removeAnimation: function(id) {
|
||||
@@ -53,14 +53,13 @@ Kinetic.GlobalObject = {
|
||||
}
|
||||
},
|
||||
_pullNodes: function(stage) {
|
||||
var go = Kinetic.GlobalObject;
|
||||
var tempNodes = go.tempNodes;
|
||||
var tempNodes = this.tempNodes;
|
||||
for(var n = 0; n < tempNodes.length; n++) {
|
||||
var node = tempNodes[n];
|
||||
if(node.getStage() !== undefined && node.getStage()._id === stage._id) {
|
||||
stage._addId(node);
|
||||
stage._addName(node);
|
||||
go.tempNodes.splice(n, 1);
|
||||
this.tempNodes.splice(n, 1);
|
||||
n -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user