Rename Document -> Project, DocumentView -> ProjectView, paper.document -> paper.project and paper.documents -> paper.projects, to avoid name clashing with window.document.

This commit is contained in:
Jürg Lehni 2011-05-16 13:33:15 +01:00
parent edd36e7df8
commit cfe968d30e
37 changed files with 699 additions and 183 deletions

View file

@ -7,7 +7,7 @@
<script type="text/javascript">var root = '../../'</script>
<script type="text/javascript" src="../../src/load.js"></script>
<script type="text/paperscript" canvas="canvas">
var layer = document.activeLayer;
var layer = project.activeLayer;
var values = {
count: 34,
@ -42,7 +42,7 @@
// Reposition the paths whenever the window is resized:
function onResize(event) {
document.activeLayer.position = view.center;
project.activeLayer.position = view.center;
}
</script>
</head>

View file

@ -10,7 +10,7 @@
// Adapted from Flocking Processing example by Daniel Schiffman:
// http://processing.org/learning/topics/flocking.html
document.currentStyle = {
project.currentStyle = {
strokeColor: 'white',
strokeWidth: 2,
strokeCap: 'round'
@ -281,7 +281,7 @@
groupTogether = !groupTogether;
}
var layer = document.activeLayer;
var layer = project.activeLayer;
function onKeyDown(event) {
if (event.key == 'space') {
layer.selected = !layer.selected;

View file

@ -17,7 +17,7 @@
var position = view.center;
var mousePos = position;
var children = document.activeLayer.children;
var children = project.activeLayer.children;
var count = 0;
function iterate() {

View file

@ -29,7 +29,7 @@
mousePoint = event.point;
}
var children = document.activeLayer.children;
var children = project.activeLayer.children;
function onFrame(event) {
for (var i = 0, l = children.length; i < l; i++) {
var item = children[i];