mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Add cloning test for layer that checks the current active layer.
This commit is contained in:
parent
14477aac59
commit
667992e9f0
1 changed files with 12 additions and 0 deletions
|
@ -45,6 +45,18 @@ test('Layer#clone()', function() {
|
||||||
cloneAndCompare(paper.project.activeLayer);
|
cloneAndCompare(paper.project.activeLayer);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('Layer#clone() - check activeLayer', function() {
|
||||||
|
var project = paper.project,
|
||||||
|
activeLayer = project.activeLayer,
|
||||||
|
layer = activeLayer.clone();
|
||||||
|
equals(function() {
|
||||||
|
return layer == project.activeLayer;
|
||||||
|
}, true);
|
||||||
|
equals(function() {
|
||||||
|
return activeLayer != project.activeLayer;
|
||||||
|
}, true);
|
||||||
|
});
|
||||||
|
|
||||||
test('Group#clone()', function() {
|
test('Group#clone()', function() {
|
||||||
var path = new Path.Circle([150, 150], 60);
|
var path = new Path.Circle([150, 150], 60);
|
||||||
path.style = {
|
path.style = {
|
||||||
|
|
Loading…
Reference in a new issue