mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
stage clone has new container. fix #707
This commit is contained in:
@@ -73,6 +73,19 @@ suite('Stage', function() {
|
||||
assert.equal(container.getElementsByTagName('p').length, 0, 'container should have no p tags');
|
||||
});
|
||||
|
||||
// ======================================================
|
||||
test('test stage cloning', function() {
|
||||
var stage = addStage();
|
||||
var layer = new Kinetic.Layer();
|
||||
stage.add(layer);
|
||||
|
||||
var stageClone = stage.clone();
|
||||
assert.notEqual(stage.getContainer(), stageClone.getContainer(), 'clone should be in different container');
|
||||
|
||||
assert.equal(stage.getContainer().childNodes[0].childNodes.length, 1, 'container should not have changes');
|
||||
|
||||
});
|
||||
|
||||
// ======================================================
|
||||
test('set stage size', function() {
|
||||
var stage = addStage();
|
||||
|
Reference in New Issue
Block a user