diff --git a/src/item/PlacedSymbol.js b/src/item/PlacedSymbol.js index 359185e4..7c60d915 100644 --- a/src/item/PlacedSymbol.js +++ b/src/item/PlacedSymbol.js @@ -20,6 +20,9 @@ */ var PlacedSymbol = this.PlacedSymbol = PlacedItem.extend(/** @lends PlacedSymbol# */{ _type: 'placedsymbol', + _serializeFields: { + symbol: null + }, /** * Creates a new PlacedSymbol Item. * diff --git a/src/project/Symbol.js b/src/project/Symbol.js index 139907c7..3754c28e 100644 --- a/src/project/Symbol.js +++ b/src/project/Symbol.js @@ -68,6 +68,11 @@ var Symbol = this.Symbol = Base.extend(/** @lends Symbol# */{ this._instances = {}; }, + _serialize: function(dictionary) { + return dictionary.get(this) || dictionary.set(this, [this._type, + Base.serialize(this._definition, false, dictionary)]); + }, + // TODO: Symbol#remove() // TODO: Symbol#name (accessible by name through project#symbols)