We want to create a deep clone, not a shallow one

This commit is contained in:
ahocevar
2013-10-05 08:42:21 -06:00
parent b40124b2bc
commit 4b934c03ba

View File

@@ -42,7 +42,7 @@ ol.geom.GeometryCollection.prototype.clone = function() {
var numComponents = this.components.length;
var components = new Array(numComponents);
for (var i = 0; i < numComponents; ++i) {
components[i] = this.components[i];
components[i] = this.components[i].clone();
}
return new ol.geom.GeometryCollection(components);
};