mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Merge remote-tracking branch 'origin/master'
Conflicts: src/ui/View.js
This commit is contained in:
commit
aa202050d2
1 changed files with 4 additions and 3 deletions
|
@ -580,14 +580,15 @@ var Item = this.Item = Base.extend({
|
|||
// TODO: Consider moving this to Base once it's useful in more than one
|
||||
// place
|
||||
var keys = ['_locked', '_visible', '_opacity', '_blendMode',
|
||||
'_clipMask', '_selected'];
|
||||
'_clipMask'];
|
||||
for (var i = 0, l = keys.length; i < l; i++) {
|
||||
var key = keys[i];
|
||||
if (this.hasOwnProperty(key))
|
||||
copy[key] = this[key];
|
||||
}
|
||||
// Insert the clone above the original, at the same position.
|
||||
copy.insertAbove(this);
|
||||
// Copy over the selection state, use setSelected so the item
|
||||
// is also added to Project#selectedItems if it is selected.
|
||||
copy.setSelected(this._selected);
|
||||
// Only set name once the copy is moved, to avoid setting and unsettting
|
||||
// name related structures.
|
||||
if (this._name)
|
||||
|
|
Loading…
Reference in a new issue