switch order of superclass.clone() (as in r901). then make sure that tileSize gets copied using copyOf(), and that the reference to the old grid does not get carried over.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@902 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-07-06 13:03:27 +00:00
parent 6b8bde0ff4
commit aa30c9cae4

View File

@@ -63,12 +63,19 @@ OpenLayers.Layer.Grid.prototype =
this.params,
this.options);
}
// copy/set any non-init, non-simple values here
obj.tileSize = this.tileSize.copyOf();
//get all additions from superclasses
return OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this, [obj]);
obj = OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this, [obj]);
// copy/set any non-init, non-simple values here
if (this.tileSize != null) {
obj.tileSize = this.tileSize.copyOf();
}
// we do not want to copy reference to grid. that should stay at null
obj.grid = null;
return obj;
},
/** When the layer is added to a map, then we can ask the map for