refined global object temp nodes has removal when removing nodes from container. Also added another unit test

This commit is contained in:
Eric Rowell
2012-04-08 17:50:46 -07:00
parent 2035d188c8
commit 4f36b27199
4 changed files with 44 additions and 6 deletions

View File

@@ -34,8 +34,10 @@ Kinetic.Container.prototype = {
_remove: function(child) {
if(this.children[child.index]._id == child._id) {
var stage = this.getStage();
stage._removeId(child);
stage._removeName(child);
if(stage !== undefined) {
stage._removeId(child);
stage._removeName(child);
}
var go = Kinetic.GlobalObject;
for(var n = 0; n < go.tempNodes.length; n++) {