Move and unify handling of Item#_set(props) to new Item#_initialize(), and add support for props.insert = false.

This commit is contained in:
Jürg Lehni 2013-07-21 15:45:22 -07:00
parent 5e2654b490
commit aa4d990c90
11 changed files with 44 additions and 46 deletions
src/project

View file

@ -46,8 +46,9 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
* Canvas element that should be wrapped in a newly created 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.
// Activate straight away by passing true to PaperScopeItem constructor,
// so paper.project is set, as required by Layer and DoumentView
// constructors.
PaperScopeItem.call(this, true);
this.layers = [];
this.symbols = [];