Changeset 7423
- Timestamp:
- 06/23/08 12:12:53 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/vector-behavior/lib/OpenLayers/BaseTypes/Bounds.js
r7028 r7423 39 39 * {Number} Maximum vertical coordinate. 40 40 */ 41 top: null, 41 top: null, 42 43 /** 44 * Property: center 45 * {<OpenLayers.LonLat>} Use <getCenterLonLat>. 46 */ 47 center: null, 42 48 43 49 /** … … 216 222 */ 217 223 getCenterLonLat:function() { 218 return new OpenLayers.LonLat( (this.left + this.right) / 2, 219 (this.bottom + this.top) / 2); 224 if(!this.center) { 225 this.center = new OpenLayers.LonLat( 226 (this.left + this.right) / 2, (this.bottom + this.top) / 2 227 ); 228 } 229 return this.center; 220 230 }, 221 231 … … 282 292 } 283 293 } 294 this.center = null; 284 295 }, 285 296
