mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-30 15:49:50 -04:00
Improve handling of item based onFrame handlers, by moving functionality to View and removing handlers properly when the view is destroyed.
This commit is contained in:
parent
5b56bd7fbf
commit
cf5853c8cc
3 changed files with 109 additions and 88 deletions
src/project
|
@ -52,14 +52,14 @@ var Project = this.Project = PaperScopeItem.extend(/** @lends Project# */{
|
|||
// Activate straight away by passing true to base(), so paper.project is
|
||||
// set, as required by Layer and DoumentView constructors.
|
||||
this.base(true);
|
||||
this._currentStyle = new PathStyle();
|
||||
this._selectedItems = {};
|
||||
this._selectedItemCount = 0;
|
||||
this.layers = [];
|
||||
this.symbols = [];
|
||||
this.activeLayer = new Layer();
|
||||
if (view)
|
||||
this.view = view instanceof View ? view : View.create(view);
|
||||
this._currentStyle = new PathStyle();
|
||||
this._selectedItems = {};
|
||||
this._selectedItemCount = 0;
|
||||
// Change tracking, not in use for now. Activate once required:
|
||||
// this._changes = [];
|
||||
// this._changesById = {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue