diff --git a/src/item/PlacedSymbol.js b/src/item/PlacedSymbol.js index 289238de..8f2c03cf 100644 --- a/src/item/PlacedSymbol.js +++ b/src/item/PlacedSymbol.js @@ -95,14 +95,14 @@ var PlacedSymbol = this.PlacedSymbol = PlacedItem.extend(/** @lends PlacedSymbol symbol._instances[this._id] = this; }, - isEmpty: function() { - return this._symbol._definition.isEmpty(); - }, - clone: function() { return this._clone(new PlacedSymbol(this.symbol)); }, + isEmpty: function() { + return this._symbol._definition.isEmpty(); + }, + _getBounds: function(getter, matrix) { // Redirect the call to the symbol definition to calculate the bounds // TODO: Implement bounds caching through passing on of cacheItem, so diff --git a/src/path/PathItem.js b/src/path/PathItem.js index 660ba97f..af757a33 100644 --- a/src/path/PathItem.js +++ b/src/path/PathItem.js @@ -101,6 +101,12 @@ var PathItem = this.PathItem = Item.extend(/** @lends PathItem# */{ ); } + // First clear the previous content + if (this._type === 'Path') + this.removeSegments(); + else + this.removeChildren(); + for (var i = 0, l = parts.length; i < l; i++) { var part = parts[i]; cmd = part[0],