From afd0388f87873d06e9c0d90417286c5153617b0d Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Sat, 23 Mar 2013 11:32:41 +0100 Subject: [PATCH] Bounds: Fixed comment location --- lib/OpenLayers/BaseTypes/Bounds.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/BaseTypes/Bounds.js b/lib/OpenLayers/BaseTypes/Bounds.js index 1e1e3715f0..33001d8d3b 100644 --- a/lib/OpenLayers/BaseTypes/Bounds.js +++ b/lib/OpenLayers/BaseTypes/Bounds.js @@ -357,7 +357,6 @@ OpenLayers.Bounds = OpenLayers.Class({ extend:function(object) { var bounds = null; if (object) { - // clear cached center location switch(object.CLASS_NAME) { case "OpenLayers.LonLat": bounds = new OpenLayers.Bounds(object.lon, object.lat, @@ -374,7 +373,9 @@ OpenLayers.Bounds = OpenLayers.Class({ } if (bounds) { + // clear cached center location this.centerLonLat = null; + if ( (this.left == null) || (bounds.left < this.left)) { this.left = bounds.left; }