mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-28 22:59:36 -04:00
Big refactoring of the way Style objects are linked to their owning classes, implemented in a way that works across all sub classes.
This commit is contained in:
parent
a45340d20f
commit
a7e57ada88
7 changed files with 89 additions and 90 deletions
src/project
|
@ -38,15 +38,7 @@ var Project = this.Project = Base.extend({
|
|||
this._scope = paper;
|
||||
// Push it onto this._scope.projects and set index:
|
||||
this._index = this._scope.projects.push(this) - 1;
|
||||
this._currentStyle = PathStyle.create(null);
|
||||
this.setCurrentStyle({
|
||||
strokeWidth: 1,
|
||||
strokeCap: 'butt',
|
||||
strokeJoin: 'miter',
|
||||
miterLimit: 10,
|
||||
dashOffset: 0,
|
||||
dashArray: []
|
||||
});
|
||||
this._currentStyle = new PathStyle();
|
||||
this._selectedItems = {};
|
||||
this._selectedItemCount = 0;
|
||||
// Activate straight away so paper.project is set, as required by
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue