mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -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
|
// TODO: Consider moving this to Base once it's useful in more than one
|
||||||
// place
|
// place
|
||||||
var keys = ['_locked', '_visible', '_opacity', '_blendMode',
|
var keys = ['_locked', '_visible', '_opacity', '_blendMode',
|
||||||
'_clipMask', '_selected'];
|
'_clipMask'];
|
||||||
for (var i = 0, l = keys.length; i < l; i++) {
|
for (var i = 0, l = keys.length; i < l; i++) {
|
||||||
var key = keys[i];
|
var key = keys[i];
|
||||||
if (this.hasOwnProperty(key))
|
if (this.hasOwnProperty(key))
|
||||||
copy[key] = this[key];
|
copy[key] = this[key];
|
||||||
}
|
}
|
||||||
// Insert the clone above the original, at the same position.
|
// Copy over the selection state, use setSelected so the item
|
||||||
copy.insertAbove(this);
|
// 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
|
// Only set name once the copy is moved, to avoid setting and unsettting
|
||||||
// name related structures.
|
// name related structures.
|
||||||
if (this._name)
|
if (this._name)
|
||||||
|
|
Loading…
Reference in a new issue