mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-13 14:38:49 -04:00
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:
parent
15b1ea7af0
commit
10d5de3ed6
45 changed files with 127 additions and 154 deletions
src/project
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue