From eb762b6f4a30465dc2812cbca63266bc3599afae Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 2 Nov 2015 14:29:01 +0100 Subject: [PATCH] Update getExtent return value jsdoc tag The extent is never `null`; if the source is empty, the extent is `[Infinity, Infinity, -Infinity, -Infinity]` --- src/ol/source/vectorsource.js | 2 +- src/ol/structs/rbush.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/source/vectorsource.js b/src/ol/source/vectorsource.js index f17d5ebd74..251f66ba38 100644 --- a/src/ol/source/vectorsource.js +++ b/src/ol/source/vectorsource.js @@ -659,7 +659,7 @@ ol.source.Vector.prototype.getClosestFeatureToCoordinate = * * This method is not available when the source is configured with * `useSpatialIndex` set to `false`. - * @return {ol.Extent} Extent. + * @return {!ol.Extent} Extent. * @api stable */ ol.source.Vector.prototype.getExtent = function() { diff --git a/src/ol/structs/rbush.js b/src/ol/structs/rbush.js index deef53d687..41c6d2cd20 100644 --- a/src/ol/structs/rbush.js +++ b/src/ol/structs/rbush.js @@ -253,7 +253,7 @@ ol.structs.RBush.prototype.clear = function() { /** * @param {ol.Extent=} opt_extent Extent. - * @return {ol.Extent} Extent. + * @return {!ol.Extent} Extent. */ ol.structs.RBush.prototype.getExtent = function(opt_extent) { // FIXME add getExtent() to rbush