paper.js/test/tests/Project.js

30 lines
755 B
JavaScript
Raw Normal View History

2011-07-01 06:17:45 -04: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 12:07:14 -05:00
test('activate()', function() {
2011-05-20 09:08:17 -04:00
var project = new Project();
var secondDoc = new Project();
2011-05-20 09:08:17 -04:00
project.activate();
2011-02-12 12:07:14 -05:00
var path = new Path();
equals(function() {
2011-05-20 09:08:17 -04:00
return project.activeLayer.children[0] == path;
}, true);
equals(function() {
return secondDoc.activeLayer.children.length == 0;
}, true);
2011-02-12 12:07:14 -05:00
});