Excuse me for the hastily modified patch (in r8286). It was centerLonLat that I meant to nullify in a different location. The original patch was good - and the review by elemoine was solid. I just tweaked the patch upon reading his comment and failed to pay attention to what I was doing. So, bounds center is cached and all is well. Thanks for catching this crschmidt. (closes #1814)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@8288 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -302,9 +302,9 @@ OpenLayers.Bounds = OpenLayers.Class({
|
||||
* object - {Object} Can be LonLat, Point, or Bounds
|
||||
*/
|
||||
extend:function(object) {
|
||||
var bounds = null;
|
||||
if (object) {
|
||||
// clear cached center location
|
||||
this.centerLonLat = null;
|
||||
switch(object.CLASS_NAME) {
|
||||
case "OpenLayers.LonLat":
|
||||
bounds = new OpenLayers.Bounds(object.lon, object.lat,
|
||||
@@ -321,7 +321,7 @@ OpenLayers.Bounds = OpenLayers.Class({
|
||||
}
|
||||
|
||||
if (bounds) {
|
||||
var bounds = null;
|
||||
this.centerLonLat = null;
|
||||
if ( (this.left == null) || (bounds.left < this.left)) {
|
||||
this.left = bounds.left;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user