Module type for ol.Collection

This commit is contained in:
Frederic Junod
2018-03-19 16:32:39 +01:00
parent 38eb1494eb
commit b26e370b5b
4 changed files with 12 additions and 12 deletions

View File

@@ -39,7 +39,7 @@ import {listen, unlistenByKey} from '../events.js';
*
* The main advantage of having this as a control rather than a simple separate
* DOM element is that preventing propagation is handled for you. Controls
* will also be objects in a `ol.Collection`, so you can use their methods.
* will also be objects in a {@link module:ol/Collection~Collection}, so you can use their methods.
*
* You can also extend this base for your own control class. See
* examples/custom-controls for an example of how to do this.

View File

@@ -45,7 +45,7 @@ const MIN_RATIO = 0.1;
* @property {boolean} [collapsible=true] Whether the control can be collapsed or not.
* @property {string|Element} [label='»'] Text label to use for the collapsed
* overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.
* @property {Array.<ol.layer.Layer>|ol.Collection.<ol.layer.Layer>} [layers]
* @property {Array.<ol.layer.Layer>|module:ol/Collection~Collection.<ol.layer.Layer>} [layers]
* Layers for the overview map. If not set, then all main map layers are used
* instead.
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the control

View File

@@ -26,7 +26,7 @@ const Property = {
/**
* @classdesc
* A {@link ol.Collection} of layers that are handled together.
* A {@link module:ol/Collection~Collection} of layers that are handled together.
*
* A generic `change` event is triggered when the group/Collection changes.
*
@@ -149,22 +149,22 @@ LayerGroup.prototype.handleLayersRemove_ = function(collectionEvent) {
/**
* Returns the {@link ol.Collection collection} of {@link ol.layer.Layer layers}
* Returns the {@link module:ol/Collection~Collection collection} of {@link ol.layer.Layer layers}
* in this group.
* @return {!ol.Collection.<ol.layer.Base>} Collection of
* @return {!module:ol/Collection~Collection.<ol.layer.Base>} Collection of
* {@link ol.layer.Base layers} that are part of this group.
* @observable
* @api
*/
LayerGroup.prototype.getLayers = function() {
return /** @type {!ol.Collection.<ol.layer.Base>} */ (this.get(Property.LAYERS));
return /** @type {!module:ol/Collection~Collection.<ol.layer.Base>} */ (this.get(Property.LAYERS));
};
/**
* Set the {@link ol.Collection collection} of {@link ol.layer.Layer layers}
* Set the {@link module:ol/Collection~Collection collection} of {@link ol.layer.Layer layers}
* in this group.
* @param {!ol.Collection.<ol.layer.Base>} layers Collection of
* @param {!module:ol/Collection~Collection.<ol.layer.Base>} layers Collection of
* {@link ol.layer.Base layers} that are part of this group.
* @observable
* @api

View File

@@ -152,7 +152,7 @@ const VectorSource = function(opt_options) {
/**
* @private
* @type {ol.Collection.<module:ol/Feature~Feature>}
* @type {module:ol/Collection~Collection.<module:ol/Feature~Feature>}
*/
this.featuresCollection_ = null;
@@ -316,7 +316,7 @@ VectorSource.prototype.addFeaturesInternal = function(features) {
/**
* @param {!ol.Collection.<module:ol/Feature~Feature>} collection Collection.
* @param {!module:ol/Collection~Collection.<module:ol/Feature~Feature>} collection Collection.
* @private
*/
VectorSource.prototype.bindFeaturesCollection_ = function(collection) {
@@ -509,8 +509,8 @@ VectorSource.prototype.forEachFeatureIntersectingExtent = function(extent, callb
/**
* Get the features collection associated with this source. Will be `null`
* unless the source was configured with `useSpatialIndex` set to `false`, or
* with an {@link ol.Collection} as `features`.
* @return {ol.Collection.<module:ol/Feature~Feature>} The collection of features.
* with an {@link module:ol/Collection~Collection} as `features`.
* @return {module:ol/Collection~Collection.<module:ol/Feature~Feature>} The collection of features.
* @api
*/
VectorSource.prototype.getFeaturesCollection = function() {