Implement a better way to name and export class constructors.

This change also simplified the way classes are exported to PaperScope objects.
This commit is contained in:
Jürg Lehni 2013-05-27 12:48:58 -07:00
parent 15b1ea7af0
commit 10d5de3ed6
45 changed files with 127 additions and 154 deletions
src/project

View file

@ -30,7 +30,7 @@
* An array of all open projects is accessible through the
* {@link PaperScope#projects} variable.
*/
var Project = this.Project = PaperScopeItem.extend(/** @lends Project# */{
var Project = PaperScopeItem.extend(/** @lends Project# */{
_list: 'projects',
_reference: 'project',
@ -44,7 +44,7 @@ var Project = this.Project = PaperScopeItem.extend(/** @lends Project# */{
* @param {View|HTMLCanvasElement} view Either a view object or an HTML
* Canvas element that should be wrapped in a newly created view.
*/
initialize: function(view) {
initialize: function Project(view) {
// Activate straight away by passing true to base(), so paper.project is
// set, as required by Layer and DoumentView constructors.
PaperScopeItem.call(this, true);