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:
@@ -64,11 +64,18 @@ OpenLayers.Layer.Grid.prototype =
|
|||||||
this.options);
|
this.options);
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy/set any non-init, non-simple values here
|
|
||||||
obj.tileSize = this.tileSize.copyOf();
|
|
||||||
|
|
||||||
//get all additions from superclasses
|
//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
|
/** When the layer is added to a map, then we can ask the map for
|
||||||
|
|||||||
Reference in New Issue
Block a user