From d82f73e9e7b4763b814f2a7b46634c209206f8de Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 6 Nov 2008 00:42:37 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/BaseTypes/Bounds.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/BaseTypes/Bounds.js b/lib/OpenLayers/BaseTypes/Bounds.js index e416bdc5cf..b6717ae517 100644 --- a/lib/OpenLayers/BaseTypes/Bounds.js +++ b/lib/OpenLayers/BaseTypes/Bounds.js @@ -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; }