mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Use new Project#clear() instead of activeLayer.remove().
This commit is contained in:
parent
faecb7e78a
commit
86e77e12bc
2 changed files with 2 additions and 2 deletions
|
@ -57,7 +57,7 @@ test('Item Order', function() {
|
||||||
test('Item#moveAbove(item) / Item#moveBelow(item)', function() {
|
test('Item#moveAbove(item) / Item#moveBelow(item)', function() {
|
||||||
var item0, item1, item2;
|
var item0, item1, item2;
|
||||||
var testMove = function(command, indexes) {
|
var testMove = function(command, indexes) {
|
||||||
paper.project.activeLayer.remove();
|
paper.project.clear();
|
||||||
new Layer();
|
new Layer();
|
||||||
item0 = new Group();
|
item0 = new Group();
|
||||||
item1 = new Group();
|
item1 = new Group();
|
||||||
|
|
|
@ -16,7 +16,7 @@ function testExportImportJson(project) {
|
||||||
// Use higher precision than in comparissons, for bounds
|
// Use higher precision than in comparissons, for bounds
|
||||||
var json = project.exportJson({ precision: 8 });
|
var json = project.exportJson({ precision: 8 });
|
||||||
var project2 = new Project();
|
var project2 = new Project();
|
||||||
project2.activeLayer.remove();
|
project2.clear();
|
||||||
project2.importJson(json);
|
project2.importJson(json);
|
||||||
compareProjects(project2, project);
|
compareProjects(project2, project);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue