mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Fix options handling in Item#clone() to keep backward compatibility.
This commit is contained in:
parent
e179b08156
commit
bd7f3554d8
1 changed files with 3 additions and 2 deletions
|
@ -1473,8 +1473,9 @@ new function() { // // Scope to inject various item event handlers
|
|||
var copy = new this.constructor(Item.NO_INSERT),
|
||||
children = this._children,
|
||||
// Both `insert` and `deep` are true by default:
|
||||
insert = Base.pick(options && options.insert, true),
|
||||
deep = Base.pick(options && options.deep, true);
|
||||
insert = Base.pick(options ? options.insert : undefined,
|
||||
options === undefined || options === true),
|
||||
deep = Base.pick(options ? options.deep : undefined, true);
|
||||
// On items with children, for performance reasons due to the way that
|
||||
// styles are currently "flattened" into existing children, we need to
|
||||
// clone attributes first, then content.
|
||||
|
|
Loading…
Reference in a new issue