Improve performance of Path constructors and handling of { insert: false } Item creation.

This commit is contained in:
Jürg Lehni 2014-02-26 16:15:51 +01:00
parent 737466d15c
commit ccfd51a65a
9 changed files with 107 additions and 85 deletions
src/project

View file

@ -183,7 +183,7 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
// NOTE: If there is no layer and this project is not the active
// one, passing insert: false and calling addChild on the
// project will handle it correctly.
|| this.addChild(new Layer({ insert: false }))).addChild(child);
|| this.addChild(new Layer(Item.NO_INSERT))).addChild(child);
} else {
child = null;
}