Add stability annotation to ol.source.Vector

This commit is contained in:
Tom Payne
2014-02-03 14:39:33 +01:00
parent 26a81a05ce
commit ccfae72e8e
+14 -1
View File
@@ -72,6 +72,7 @@ goog.inherits(ol.source.Vector, ol.source.Source);
/** /**
* @param {ol.Feature} feature Feature. * @param {ol.Feature} feature Feature.
* @todo stability experimental
*/ */
ol.source.Vector.prototype.addFeature = function(feature) { ol.source.Vector.prototype.addFeature = function(feature) {
this.addFeatureInternal(feature); this.addFeatureInternal(feature);
@@ -103,6 +104,7 @@ ol.source.Vector.prototype.addFeatureInternal = function(feature) {
/** /**
* @param {Array.<ol.Feature>} features Features. * @param {Array.<ol.Feature>} features Features.
* @todo stability experimental
*/ */
ol.source.Vector.prototype.addFeatures = function(features) { ol.source.Vector.prototype.addFeatures = function(features) {
this.addFeaturesInternal(features); this.addFeaturesInternal(features);
@@ -125,7 +127,7 @@ ol.source.Vector.prototype.addFeaturesInternal = function(features) {
/** /**
* FIXME empty description for jsdoc * @todo stability experimental
*/ */
ol.source.Vector.prototype.clear = function() { ol.source.Vector.prototype.clear = function() {
this.rBush_.forEach(this.removeFeatureInternal, this); this.rBush_.forEach(this.removeFeatureInternal, this);
@@ -143,6 +145,7 @@ ol.source.Vector.prototype.clear = function() {
* @param {T=} opt_this The object to use as `this` in `f`. * @param {T=} opt_this The object to use as `this` in `f`.
* @return {S|undefined} * @return {S|undefined}
* @template T,S * @template T,S
* @todo stability experimental
*/ */
ol.source.Vector.prototype.forEachFeature = function(f, opt_this) { ol.source.Vector.prototype.forEachFeature = function(f, opt_this) {
return this.rBush_.forEach(f, opt_this); return this.rBush_.forEach(f, opt_this);
@@ -155,6 +158,7 @@ ol.source.Vector.prototype.forEachFeature = function(f, opt_this) {
* @param {T=} opt_this The object to use as `this` in `f`. * @param {T=} opt_this The object to use as `this` in `f`.
* @return {S|undefined} * @return {S|undefined}
* @template T,S * @template T,S
* @todo stability experimental
*/ */
ol.source.Vector.prototype.forEachFeatureAtCoordinate = ol.source.Vector.prototype.forEachFeatureAtCoordinate =
function(coordinate, f, opt_this) { function(coordinate, f, opt_this) {
@@ -177,6 +181,7 @@ ol.source.Vector.prototype.forEachFeatureAtCoordinate =
* @param {T=} opt_this The object to use as `this` in `f`. * @param {T=} opt_this The object to use as `this` in `f`.
* @return {S|undefined} * @return {S|undefined}
* @template T,S * @template T,S
* @todo stability experimental
*/ */
ol.source.Vector.prototype.forEachFeatureInExtent = ol.source.Vector.prototype.forEachFeatureInExtent =
function(extent, f, opt_this) { function(extent, f, opt_this) {
@@ -186,6 +191,7 @@ ol.source.Vector.prototype.forEachFeatureInExtent =
/** /**
* @return {Array.<ol.Feature>} Features. * @return {Array.<ol.Feature>} Features.
* @todo stability experimental
*/ */
ol.source.Vector.prototype.getAllFeatures = function() { ol.source.Vector.prototype.getAllFeatures = function() {
var features = this.rBush_.getAll(); var features = this.rBush_.getAll();
@@ -200,6 +206,7 @@ ol.source.Vector.prototype.getAllFeatures = function() {
/** /**
* @param {ol.Coordinate} coordinate Coordinate. * @param {ol.Coordinate} coordinate Coordinate.
* @return {Array.<ol.Feature>} Features. * @return {Array.<ol.Feature>} Features.
* @todo stability experimental
*/ */
ol.source.Vector.prototype.getAllFeaturesAtCoordinate = function(coordinate) { ol.source.Vector.prototype.getAllFeaturesAtCoordinate = function(coordinate) {
var features = []; var features = [];
@@ -213,6 +220,7 @@ ol.source.Vector.prototype.getAllFeaturesAtCoordinate = function(coordinate) {
/** /**
* @param {ol.Extent} extent Extent. * @param {ol.Extent} extent Extent.
* @return {Array.<ol.Feature>} Features. * @return {Array.<ol.Feature>} Features.
* @todo stability experimental
*/ */
ol.source.Vector.prototype.getAllFeaturesInExtent = function(extent) { ol.source.Vector.prototype.getAllFeaturesInExtent = function(extent) {
return this.rBush_.getAllInExtent(extent); return this.rBush_.getAllInExtent(extent);
@@ -222,6 +230,7 @@ ol.source.Vector.prototype.getAllFeaturesInExtent = function(extent) {
/** /**
* @param {ol.Coordinate} coordinate Coordinate. * @param {ol.Coordinate} coordinate Coordinate.
* @return {ol.Feature} Closest feature. * @return {ol.Feature} Closest feature.
* @todo stability experimental
*/ */
ol.source.Vector.prototype.getClosestFeatureToCoordinate = ol.source.Vector.prototype.getClosestFeatureToCoordinate =
function(coordinate) { function(coordinate) {
@@ -267,6 +276,7 @@ ol.source.Vector.prototype.getClosestFeatureToCoordinate =
/** /**
* @return {ol.Extent} Extent. * @return {ol.Extent} Extent.
* @todo stability experimental
*/ */
ol.source.Vector.prototype.getExtent = function() { ol.source.Vector.prototype.getExtent = function() {
return this.rBush_.getExtent(); return this.rBush_.getExtent();
@@ -301,6 +311,7 @@ ol.source.Vector.prototype.handleFeatureChange_ = function(event) {
/** /**
* @return {boolean} Is empty. * @return {boolean} Is empty.
* @todo stability experimental
*/ */
ol.source.Vector.prototype.isEmpty = function() { ol.source.Vector.prototype.isEmpty = function() {
return this.rBush_.isEmpty() && return this.rBush_.isEmpty() &&
@@ -310,6 +321,7 @@ ol.source.Vector.prototype.isEmpty = function() {
/** /**
* @param {ol.Feature} feature Feature. * @param {ol.Feature} feature Feature.
* @todo stability experimental
*/ */
ol.source.Vector.prototype.removeFeature = function(feature) { ol.source.Vector.prototype.removeFeature = function(feature) {
var featureKey = goog.getUid(feature).toString(); var featureKey = goog.getUid(feature).toString();
@@ -345,6 +357,7 @@ ol.source.Vector.prototype.removeFeatureInternal = function(feature) {
* @implements {oli.source.VectorEvent} * @implements {oli.source.VectorEvent}
* @param {string} type Type. * @param {string} type Type.
* @param {ol.Feature=} opt_feature Feature. * @param {ol.Feature=} opt_feature Feature.
* @todo stability experimental
*/ */
ol.source.VectorEvent = function(type, opt_feature) { ol.source.VectorEvent = function(type, opt_feature) {