mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-12 22:18:54 -04:00
Improve performance of Path constructors and handling of { insert: false } Item creation.
This commit is contained in:
parent
737466d15c
commit
ccfd51a65a
9 changed files with 107 additions and 85 deletions
src/project
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue