mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Use Item#remove() instead of calling #setSelected(false) and #_removeFromParent().
This commit is contained in:
parent
2fe274741a
commit
eb73c55736
1 changed files with 2 additions and 3 deletions
|
@ -92,9 +92,8 @@ var Symbol = this.Symbol = Base.extend({
|
|||
|
||||
setDefinition: function(item) {
|
||||
this._definition = item;
|
||||
// Deselect the item, as PlacedSymbol has its own selection.
|
||||
item.setSelected(false);
|
||||
item._removeFromParent();
|
||||
// Remove item from DOM, as it's embedded in Symbol now.
|
||||
item.remove();
|
||||
// Move position to 0, 0. TODO: Why?
|
||||
item.setPosition(new Point());
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue