Add @api stable annotations for ol.Feature

This commit is contained in:
Éric Lemoine
2014-08-19 17:02:25 +02:00
parent 365caa6f19
commit 239a90cd55
+12 -12
View File
@@ -55,7 +55,7 @@ goog.require('ol.style.Style');
* You may pass a Geometry object directly, or an object literal * You may pass a Geometry object directly, or an object literal
* containing properties. If you pass an object literal, you may * containing properties. If you pass an object literal, you may
* include a Geometry associated with a `geometry` key. * include a Geometry associated with a `geometry` key.
* @api * @api stable
*/ */
ol.Feature = function(opt_geometryOrProperties) { ol.Feature = function(opt_geometryOrProperties) {
@@ -117,7 +117,7 @@ goog.inherits(ol.Feature, ol.Object);
* Clone this feature. If the original feature has a geometry it * Clone this feature. If the original feature has a geometry it
* is also cloned. The feature id is not set in the clone. * is also cloned. The feature id is not set in the clone.
* @return {ol.Feature} The clone. * @return {ol.Feature} The clone.
* @api * @api stable
*/ */
ol.Feature.prototype.clone = function() { ol.Feature.prototype.clone = function() {
var clone = new ol.Feature(this.getProperties()); var clone = new ol.Feature(this.getProperties());
@@ -139,7 +139,7 @@ ol.Feature.prototype.clone = function() {
* with this feature using the current geometry name property. By * with this feature using the current geometry name property. By
* default, this is `geometry` but it may be changed by calling * default, this is `geometry` but it may be changed by calling
* `setGeometryName`. * `setGeometryName`.
* @api * @api stable
* @observable * @observable
*/ */
ol.Feature.prototype.getGeometry = function() { ol.Feature.prototype.getGeometry = function() {
@@ -154,7 +154,7 @@ goog.exportProperty(
/** /**
* @return {number|string|undefined} Id. * @return {number|string|undefined} Id.
* @api * @api stable
*/ */
ol.Feature.prototype.getId = function() { ol.Feature.prototype.getId = function() {
return this.id_; return this.id_;
@@ -165,7 +165,7 @@ ol.Feature.prototype.getId = function() {
* @return {string} Get the property name associated with the geometry for * @return {string} Get the property name associated with the geometry for
* this feature. By default, this is `geometry` but it may be changed by * this feature. By default, this is `geometry` but it may be changed by
* calling `setGeometryName`. * calling `setGeometryName`.
* @api * @api stable
*/ */
ol.Feature.prototype.getGeometryName = function() { ol.Feature.prototype.getGeometryName = function() {
return this.geometryName_; return this.geometryName_;
@@ -177,7 +177,7 @@ ol.Feature.prototype.getGeometryName = function() {
* ol.feature.FeatureStyleFunction} Return the style as set by setStyle in * ol.feature.FeatureStyleFunction} Return the style as set by setStyle in
* the same format that it was provided in. If setStyle has not been run, * the same format that it was provided in. If setStyle has not been run,
* return `undefined`. * return `undefined`.
* @api * @api stable
*/ */
ol.Feature.prototype.getStyle = function() { ol.Feature.prototype.getStyle = function() {
return this.style_; return this.style_;
@@ -187,7 +187,7 @@ ol.Feature.prototype.getStyle = function() {
/** /**
* @return {ol.feature.FeatureStyleFunction|undefined} Return a function * @return {ol.feature.FeatureStyleFunction|undefined} Return a function
* representing the current style of this feature. * representing the current style of this feature.
* @api * @api stable
*/ */
ol.Feature.prototype.getStyleFunction = function() { ol.Feature.prototype.getStyleFunction = function() {
return this.styleFunction_; return this.styleFunction_;
@@ -224,7 +224,7 @@ ol.Feature.prototype.handleGeometryChanged_ = function() {
* feature. This will update the property associated with the current * feature. This will update the property associated with the current
* geometry property name. By default, this is `geometry` but it can be * geometry property name. By default, this is `geometry` but it can be
* changed by calling `setGeometryName`. * changed by calling `setGeometryName`.
* @api * @api stable
* @observable * @observable
*/ */
ol.Feature.prototype.setGeometry = function(geometry) { ol.Feature.prototype.setGeometry = function(geometry) {
@@ -239,7 +239,7 @@ goog.exportProperty(
/** /**
* @param {ol.style.Style|Array.<ol.style.Style>| * @param {ol.style.Style|Array.<ol.style.Style>|
* ol.feature.FeatureStyleFunction} style Set the style for this feature. * ol.feature.FeatureStyleFunction} style Set the style for this feature.
* @api * @api stable
*/ */
ol.Feature.prototype.setStyle = function(style) { ol.Feature.prototype.setStyle = function(style) {
this.style_ = style; this.style_ = style;
@@ -252,7 +252,7 @@ ol.Feature.prototype.setStyle = function(style) {
* @param {number|string|undefined} id Set a unique id for this feature. * @param {number|string|undefined} id Set a unique id for this feature.
* The id may be used to retrieve a feature from a vector source with the * The id may be used to retrieve a feature from a vector source with the
* {@link ol.source.Vector#getFeatureById} method. * {@link ol.source.Vector#getFeatureById} method.
* @api * @api stable
*/ */
ol.Feature.prototype.setId = function(id) { ol.Feature.prototype.setId = function(id) {
this.id_ = id; this.id_ = id;
@@ -263,7 +263,7 @@ ol.Feature.prototype.setId = function(id) {
/** /**
* @param {string} name Set the property name from which this feature's * @param {string} name Set the property name from which this feature's
* geometry will be fetched when calling `getGeometry`. * geometry will be fetched when calling `getGeometry`.
* @api * @api stable
*/ */
ol.Feature.prototype.setGeometryName = function(name) { ol.Feature.prototype.setGeometryName = function(name) {
goog.events.unlisten( goog.events.unlisten(
@@ -284,7 +284,7 @@ ol.Feature.prototype.setGeometryName = function(name) {
* {@link ol.Feature} to be styled. * {@link ol.Feature} to be styled.
* *
* @typedef {function(this: ol.Feature, number): Array.<ol.style.Style>} * @typedef {function(this: ol.Feature, number): Array.<ol.style.Style>}
* @api * @api stable
*/ */
ol.feature.FeatureStyleFunction; ol.feature.FeatureStyleFunction;