Module type for ol.layer.Base

This commit is contained in:
Frederic Junod
2018-03-22 12:06:56 +01:00
parent 34f6d20e40
commit 14dc03b434
3 changed files with 10 additions and 10 deletions

View File

@@ -27,7 +27,7 @@ import {assign} from '../obj.js';
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
* instantiated in apps.
* Note that with `ol.layer.Base` and all its subclasses, any property set in
* Note that with `module:ol/layer/Base~BaseLayer` and all its subclasses, any property set in
* the options is set as a {@link module:ol/Object~BaseObject} property on the layer object, so
* is observable, and has get/set accessors.
*

View File

@@ -31,7 +31,7 @@ const Property = {
* A generic `change` event is triggered when the group/Collection changes.
*
* @constructor
* @extends {ol.layer.Base}
* @extends {module:ol/layer/Base~BaseLayer}
* @param {olx.layer.GroupOptions=} opt_options Layer options.
* @api
*/
@@ -125,7 +125,7 @@ LayerGroup.prototype.handleLayersChanged_ = function(event) {
* @private
*/
LayerGroup.prototype.handleLayersAdd_ = function(collectionEvent) {
const layer = /** @type {ol.layer.Base} */ (collectionEvent.element);
const layer = /** @type {module:ol/layer/Base~BaseLayer} */ (collectionEvent.element);
const key = getUid(layer).toString();
this.listenerKeys_[key] = [
listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this),
@@ -140,7 +140,7 @@ LayerGroup.prototype.handleLayersAdd_ = function(collectionEvent) {
* @private
*/
LayerGroup.prototype.handleLayersRemove_ = function(collectionEvent) {
const layer = /** @type {ol.layer.Base} */ (collectionEvent.element);
const layer = /** @type {module:ol/layer/Base~BaseLayer} */ (collectionEvent.element);
const key = getUid(layer).toString();
this.listenerKeys_[key].forEach(unlistenByKey);
delete this.listenerKeys_[key];
@@ -151,21 +151,21 @@ LayerGroup.prototype.handleLayersRemove_ = function(collectionEvent) {
/**
* Returns the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
* in this group.
* @return {!module:ol/Collection~Collection.<ol.layer.Base>} Collection of
* {@link ol.layer.Base layers} that are part of this group.
* @return {!module:ol/Collection~Collection.<module:ol/layer/Base~BaseLayer>} Collection of
* {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
* @observable
* @api
*/
LayerGroup.prototype.getLayers = function() {
return /** @type {!module:ol/Collection~Collection.<ol.layer.Base>} */ (this.get(Property.LAYERS));
return /** @type {!module:ol/Collection~Collection.<module:ol/layer/Base~BaseLayer>} */ (this.get(Property.LAYERS));
};
/**
* Set the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
* in this group.
* @param {!module:ol/Collection~Collection.<ol.layer.Base>} layers Collection of
* {@link ol.layer.Base layers} that are part of this group.
* @param {!module:ol/Collection~Collection.<module:ol/layer/Base~BaseLayer>} layers Collection of
* {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
* @observable
* @api
*/

View File

@@ -43,7 +43,7 @@ import SourceState from '../source/State.js';
*
* @constructor
* @abstract
* @extends {ol.layer.Base}
* @extends {module:ol/layer/Base~BaseLayer}
* @fires ol.render.Event
* @param {olx.layer.LayerOptions} options Layer options.
* @api