paper.js/test/tests/Project.js

30 lines
755 B
JavaScript
Raw Normal View History

2011-07-01 12:17:45 +02:00
/*
* Paper.js
*
* This file is part of Paper.js, a JavaScript Vector Graphics Library,
* based on Scriptographer.org and designed to be largely API compatible.
* http://paperjs.org/
* http://scriptographer.org/
*
* Copyright (c) 2011, Juerg Lehni & Jonathan Puckey
* http://lehni.org/ & http://jonathanpuckey.com/
*
* Distributed under the MIT license. See LICENSE file for details.
*
* All rights reserved.
*/
module('Project');
2011-02-12 18:07:14 +01:00
test('activate()', function() {
2011-05-20 14:08:17 +01:00
var project = new Project();
var secondDoc = new Project();
2011-05-20 14:08:17 +01:00
project.activate();
2011-02-12 18:07:14 +01:00
var path = new Path();
equals(function() {
2011-05-20 14:08:17 +01:00
return project.activeLayer.children[0] == path;
}, true);
equals(function() {
return secondDoc.activeLayer.children.length == 0;
}, true);
2011-02-12 18:07:14 +01:00
});