This commit is contained in:
Лаврёнов Антон 2014-02-27 22:53:30 +08:00
parent 1d4a65ae08
commit 6c46e44bbd
2 changed files with 5 additions and 0 deletions

View File

@ -153,6 +153,10 @@
if(content && Kinetic.Util._isInDocument(content)) {
this.getContainer().removeChild(content);
}
var index = Kinetic.stages.indexOf(this);
if (index > -1) {
Kinetic.stages.splice(index, 1);
}
},
/**
* get pointer position which can be a touch position or mouse position

View File

@ -403,6 +403,7 @@ suite('Stage', function() {
assert.equal(Kinetic.names.stageFalconName, undefined, 'stage should no longer be in names map');
assert.equal(Kinetic.ids.circleFalconId, undefined, 'circle should no longer be in ids map');
assert.equal(Kinetic.names.circleFalconName, undefined, 'circle should no longer be in names map');
assert.equal(Kinetic.stages.indexOf(stage) === -1, true, 'stage should not be in stages array');
});