Use Item#remove() instead of calling #setSelected(false) and #_removeFromParent().

This commit is contained in:
Jürg Lehni 2011-06-19 16:13:38 +01:00
parent 2fe274741a
commit eb73c55736

View file

@ -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());
},