mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Commit changes forgotten in 6450430b68
This commit is contained in:
parent
0eb96898a3
commit
91539e6bc5
1 changed files with 3 additions and 2 deletions
|
@ -88,7 +88,8 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
|||
var hasProps = props && Base.isPlainObject(props),
|
||||
internal = hasProps && props.internal === true,
|
||||
matrix = this._matrix = new Matrix(),
|
||||
project = paper.project;
|
||||
// Allow setting another project than the currently active one.
|
||||
project = hasProps && props.project || paper.project;
|
||||
if (!internal)
|
||||
this._id = Item._id = (Item._id || 0) + 1;
|
||||
// Inherit the applyMatrix setting from paper.settings.applyMatrix
|
||||
|
@ -111,7 +112,7 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
|||
} else {
|
||||
// Create a new layer if there is no active one. This will
|
||||
// automatically make it the new activeLayer.
|
||||
(project.activeLayer || new Layer()).addChild(this);
|
||||
(project._activeLayer || new Layer()).addChild(this);
|
||||
}
|
||||
}
|
||||
// Filter out Item.NO_INSERT before _set(), for performance reasons.
|
||||
|
|
Loading…
Reference in a new issue