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:
Jürg Lehni 2011-06-20 14:58:48 +01:00
parent a45340d20f
commit a7e57ada88
7 changed files with 89 additions and 90 deletions
src/project

View file

@ -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