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
+1 -1
View File
@@ -27,7 +27,7 @@ import {assign} from '../obj.js';
* @classdesc * @classdesc
* Abstract base class; normally only used for creating subclasses and not * Abstract base class; normally only used for creating subclasses and not
* instantiated in apps. * 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 * the options is set as a {@link module:ol/Object~BaseObject} property on the layer object, so
* is observable, and has get/set accessors. * is observable, and has get/set accessors.
* *
+8 -8
View File
@@ -31,7 +31,7 @@ const Property = {
* A generic `change` event is triggered when the group/Collection changes. * A generic `change` event is triggered when the group/Collection changes.
* *
* @constructor * @constructor
* @extends {ol.layer.Base} * @extends {module:ol/layer/Base~BaseLayer}
* @param {olx.layer.GroupOptions=} opt_options Layer options. * @param {olx.layer.GroupOptions=} opt_options Layer options.
* @api * @api
*/ */
@@ -125,7 +125,7 @@ LayerGroup.prototype.handleLayersChanged_ = function(event) {
* @private * @private
*/ */
LayerGroup.prototype.handleLayersAdd_ = function(collectionEvent) { 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(); const key = getUid(layer).toString();
this.listenerKeys_[key] = [ this.listenerKeys_[key] = [
listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this), listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this),
@@ -140,7 +140,7 @@ LayerGroup.prototype.handleLayersAdd_ = function(collectionEvent) {
* @private * @private
*/ */
LayerGroup.prototype.handleLayersRemove_ = function(collectionEvent) { 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(); const key = getUid(layer).toString();
this.listenerKeys_[key].forEach(unlistenByKey); this.listenerKeys_[key].forEach(unlistenByKey);
delete this.listenerKeys_[key]; 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} * Returns the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
* in this group. * in this group.
* @return {!module:ol/Collection~Collection.<ol.layer.Base>} Collection of * @return {!module:ol/Collection~Collection.<module:ol/layer/Base~BaseLayer>} Collection of
* {@link ol.layer.Base layers} that are part of this group. * {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
* @observable * @observable
* @api * @api
*/ */
LayerGroup.prototype.getLayers = function() { 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} * Set the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
* in this group. * in this group.
* @param {!module:ol/Collection~Collection.<ol.layer.Base>} layers Collection of * @param {!module:ol/Collection~Collection.<module:ol/layer/Base~BaseLayer>} layers Collection of
* {@link ol.layer.Base layers} that are part of this group. * {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
* @observable * @observable
* @api * @api
*/ */
+1 -1
View File
@@ -43,7 +43,7 @@ import SourceState from '../source/State.js';
* *
* @constructor * @constructor
* @abstract * @abstract
* @extends {ol.layer.Base} * @extends {module:ol/layer/Base~BaseLayer}
* @fires ol.render.Event * @fires ol.render.Event
* @param {olx.layer.LayerOptions} options Layer options. * @param {olx.layer.LayerOptions} options Layer options.
* @api * @api