add() now can add multiple layers or nodes

This commit is contained in:
Victor Michnowicz
2014-03-13 23:30:46 -04:00
parent 347e4d697f
commit 0898c24b7a
4 changed files with 54 additions and 8 deletions

View File

@@ -429,4 +429,13 @@ suite('Stage', function() {
//console.log(stage.getStage());
});
test('add multiple layers to stage', function() {
var stage = addStage();
var layer1 = new Kinetic.Layer();
var layer2 = new Kinetic.Layer();
var layer3 = new Kinetic.Layer();
stage.add(layer1, layer2, layer3);
assert.equal(stage.getLayers().length, 3, 'stage has exactly three layers');
});
});