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

@ -22,7 +22,7 @@
path.arcTo(point + vector, true);
}
}
document.activeLayer.appendBottom(path);
project.activeLayer.appendBottom(path);
}
</script>
</head>

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">
document.currentStyle.fillColor = 'black';
project.currentStyle.fillColor = 'black';
var path1 = new Path.Rectangle([200, 200], [100, 100]);
var path2 = new Path.Rectangle([50, 50], [200, 200]);
var path3 = new Path.Rectangle([0, 0], [400, 400]);

View file

@ -28,11 +28,11 @@
}
}
}
document.activeLayer.position = view.center;
project.activeLayer.position = view.center;
// 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

@ -9,7 +9,7 @@
<script type="text/paperscript" canvas="canvas">
var path;
var rect = new Rectangle([150, 150], [300, 300]);
document.currentStyle.fillColor = 'black';
project.currentStyle.fillColor = 'black';
function onFrame(event) {
if (path)