Merge pull request #7999 from fredj/jsdoc_module
More Jsdoc module fixes
This commit is contained in:
@@ -8,13 +8,13 @@
|
||||
export default {
|
||||
/**
|
||||
* Triggered when an item is added to the collection.
|
||||
* @event module:ol/CollectionEvent~CollectionEvent#add
|
||||
* @event module:ol/Collection~CollectionEvent#add
|
||||
* @api
|
||||
*/
|
||||
ADD: 'add',
|
||||
/**
|
||||
* Triggered when an item is removed from the collection.
|
||||
* @event module:ol/CollectionEvent~CollectionEvent#remove
|
||||
* @event module:ol/Collection~CollectionEvent#remove
|
||||
* @api
|
||||
*/
|
||||
REMOVE: 'remove'
|
||||
|
||||
@@ -18,7 +18,7 @@ import {toString} from './color.js';
|
||||
|
||||
/**
|
||||
* @param {module:ol/color~Color|module:ol/colorlike~ColorLike} color Color.
|
||||
* @return {module:ol/color~ColorLike} The color as an {@link ol/color~ColorLike}.
|
||||
* @return {module:ol/colorlike~ColorLike} The color as an {@link ol/colorlike~ColorLike}.
|
||||
* @api
|
||||
*/
|
||||
export function asColorLike(color) {
|
||||
@@ -31,8 +31,8 @@ export function asColorLike(color) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {?} color The value that is potentially an {@link ol/color~ColorLike}.
|
||||
* @return {boolean} The color is an {@link ol/color~ColorLike}.
|
||||
* @param {?} color The value that is potentially an {@link ol/colorlike~ColorLike}.
|
||||
* @return {boolean} The color is an {@link ol/colorlike~ColorLike}.
|
||||
*/
|
||||
export function isColorLike(color) {
|
||||
return (
|
||||
|
||||
@@ -11,14 +11,14 @@ import Zoom from './control/Zoom.js';
|
||||
* @typedef {Object} DefaultsOptions
|
||||
* @property {boolean} [attribution=true] Include
|
||||
* {@link module:ol/control/Attribution~Attribution}.
|
||||
* @property {module:ol/control/Attribution~AttributionOptions} [attributionOptions]
|
||||
* @property {module:ol/control/Attribution~Options} [attributionOptions]
|
||||
* Options for {@link module:ol/control/Attribution~Attribution}.
|
||||
* @property {boolean} [rotate=true] Include
|
||||
* {@link module:ol/control/Rotate~Rotate}.
|
||||
* @property {module:ol/control/Rotate~RotateOptions} [rotateOptions] Options
|
||||
* @property {module:ol/control/Rotate~Options} [rotateOptions] Options
|
||||
* for {@link module:ol/control/Rotate~Rotate}.
|
||||
* @property {boolean} [zoom] Include {@link module:ol/control/Zoom~Zoom}.
|
||||
* @property {module:ol/control/Zoom~ZoomOptions} [zoomOptions] Options for
|
||||
* @property {module:ol/control/Zoom~Options} [zoomOptions] Options for
|
||||
* {@link module:ol/control/Zoom~Zoom}.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
@@ -53,7 +53,7 @@ const MIN_RATIO = 0.1;
|
||||
* @property {Element|string} [target] Specify a target if you want the control
|
||||
* to be rendered outside of the map's viewport.
|
||||
* @property {string} [tipLabel='Overview map'] Text label to use for the button tip.
|
||||
* @property {ol.View} [view] Custom view for the overview map. If not provided,
|
||||
* @property {module:ol/View~View} [view] Custom view for the overview map. If not provided,
|
||||
* a default view with an EPSG:3857 projection will be used.
|
||||
*/
|
||||
|
||||
@@ -270,12 +270,12 @@ OverviewMap.prototype.setMap = function(map) {
|
||||
|
||||
/**
|
||||
* Handle map property changes. This only deals with changes to the map's view.
|
||||
* @param {module:ol/Object~BaseObject.Event} event The propertychange event.
|
||||
* @param {module:ol/Object~ObjectEvent} event The propertychange event.
|
||||
* @private
|
||||
*/
|
||||
OverviewMap.prototype.handleMapPropertyChange_ = function(event) {
|
||||
if (event.key === MapProperty.VIEW) {
|
||||
const oldView = /** @type {ol.View} */ (event.oldValue);
|
||||
const oldView = /** @type {module:ol/View~View} */ (event.oldValue);
|
||||
if (oldView) {
|
||||
this.unbindView_(oldView);
|
||||
}
|
||||
@@ -287,7 +287,7 @@ OverviewMap.prototype.handleMapPropertyChange_ = function(event) {
|
||||
|
||||
/**
|
||||
* Register listeners for view property changes.
|
||||
* @param {ol.View} view The view.
|
||||
* @param {module:ol/View~View} view The view.
|
||||
* @private
|
||||
*/
|
||||
OverviewMap.prototype.bindView_ = function(view) {
|
||||
@@ -299,7 +299,7 @@ OverviewMap.prototype.bindView_ = function(view) {
|
||||
|
||||
/**
|
||||
* Unregister listeners for view property changes.
|
||||
* @param {ol.View} view The view.
|
||||
* @param {module:ol/View~View} view The view.
|
||||
* @private
|
||||
*/
|
||||
OverviewMap.prototype.unbindView_ = function(view) {
|
||||
|
||||
@@ -182,13 +182,13 @@ const Draw = function(options) {
|
||||
this.downPx_ = null;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @type {number|undefined}
|
||||
* @private
|
||||
*/
|
||||
this.downTimeout_;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
* @type {number|undefined}
|
||||
* @private
|
||||
*/
|
||||
this.lastDragTime_;
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
@@ -121,7 +121,7 @@ LayerGroup.prototype.handleLayersChanged_ = function(event) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.CollectionEvent} collectionEvent CollectionEvent.
|
||||
* @param {module:ol/Collection~CollectionEvent} collectionEvent CollectionEvent.
|
||||
* @private
|
||||
*/
|
||||
LayerGroup.prototype.handleLayersAdd_ = function(collectionEvent) {
|
||||
@@ -136,7 +136,7 @@ LayerGroup.prototype.handleLayersAdd_ = function(collectionEvent) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.CollectionEvent} collectionEvent CollectionEvent.
|
||||
* @param {module:ol/Collection~CollectionEvent} collectionEvent CollectionEvent.
|
||||
* @private
|
||||
*/
|
||||
LayerGroup.prototype.handleLayersRemove_ = function(collectionEvent) {
|
||||
@@ -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
|
||||
|
||||
@@ -12,7 +12,7 @@ import SourceState from '../source/State.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.Observable}
|
||||
* @extends {module:ol/Observable~Observable}
|
||||
* @param {ol.layer.Layer} layer Layer.
|
||||
* @struct
|
||||
*/
|
||||
@@ -95,7 +95,7 @@ LayerRenderer.prototype.getLayer = function() {
|
||||
* @private
|
||||
*/
|
||||
LayerRenderer.prototype.handleImageChange_ = function(event) {
|
||||
const image = /** @type {ol.Image} */ (event.target);
|
||||
const image = /** @type {module:ol/Image~Image} */ (event.target);
|
||||
if (image.getState() === ImageState.LOADED) {
|
||||
this.renderIfReadyAndVisible();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ const ImageSourceEventType = {
|
||||
* @extends {module:ol/events/Event~Event}
|
||||
* @implements {oli.source.ImageEvent}
|
||||
* @param {string} type Type.
|
||||
* @param {ol.Image} image The image.
|
||||
* @param {module:ol/Image~Image} image The image.
|
||||
*/
|
||||
const ImageSourceEvent = function(type, image) {
|
||||
|
||||
@@ -58,7 +58,7 @@ const ImageSourceEvent = function(type, image) {
|
||||
|
||||
/**
|
||||
* The image related to the event.
|
||||
* @type {ol.Image}
|
||||
* @type {module:ol/Image~Image}
|
||||
* @api
|
||||
*/
|
||||
this.image = image;
|
||||
@@ -196,7 +196,7 @@ ImageSource.prototype.getImageInternal = function(extent, resolution, pixelRatio
|
||||
* @protected
|
||||
*/
|
||||
ImageSource.prototype.handleImageChange = function(event) {
|
||||
const image = /** @type {ol.Image} */ (event.target);
|
||||
const image = /** @type {module:ol/Image~Image} */ (event.target);
|
||||
switch (image.getState()) {
|
||||
case ImageState.LOADING:
|
||||
this.dispatchEvent(
|
||||
@@ -220,9 +220,9 @@ ImageSource.prototype.handleImageChange = function(event) {
|
||||
|
||||
|
||||
/**
|
||||
* Default image load function for image sources that use ol.Image image
|
||||
* Default image load function for image sources that use module:ol/Image~Image image
|
||||
* instances.
|
||||
* @param {ol.Image} image Image.
|
||||
* @param {module:ol/Image~Image} image Image.
|
||||
* @param {string} src Source.
|
||||
*/
|
||||
export function defaultImageLoadFunction(image, src) {
|
||||
|
||||
@@ -71,7 +71,7 @@ const ImageArcGISRest = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.Image}
|
||||
* @type {module:ol/Image~Image}
|
||||
*/
|
||||
this.image_ = null;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ const ImageCanvasSource = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.ImageCanvas}
|
||||
* @type {module:ol/ImageCanvas~ImageCanvas}
|
||||
*/
|
||||
this.canvas_ = null;
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ const ImageMapGuide = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.Image}
|
||||
* @type {module:ol/Image~Image}
|
||||
*/
|
||||
this.image_ = null;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ const Static = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.Image}
|
||||
* @type {module:ol/Image~Image}
|
||||
*/
|
||||
this.image_ = new ImageWrapper(imageExtent, undefined, 1, options.url, crossOrigin, imageLoadFunction);
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ const ImageWMS = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.Image}
|
||||
* @type {module:ol/Image~Image}
|
||||
*/
|
||||
this.image_ = null;
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ const RasterSource = function(options) {
|
||||
|
||||
/**
|
||||
* The most recently rendered image canvas.
|
||||
* @type {ol.ImageCanvas}
|
||||
* @type {module:ol/ImageCanvas~ImageCanvas}
|
||||
* @private
|
||||
*/
|
||||
this.renderedImageCanvas_ = null;
|
||||
|
||||
@@ -53,7 +53,7 @@ const TileImage = function(options) {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {function(new: ol.ImageTile, module:ol/tilecoord~TileCoord, module:ol/TileState~TileState, string,
|
||||
* @type {function(new: module:ol/ImageTile~ImageTile, module:ol/tilecoord~TileCoord, module:ol/TileState~TileState, string,
|
||||
* ?string, module:ol/Tile~LoadFunction, module:ol/Tile~Options=)}
|
||||
*/
|
||||
this.tileClass = options.tileClass !== undefined ?
|
||||
@@ -361,7 +361,7 @@ TileImage.prototype.setTileGridForProjection = function(projection, tilegrid) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.ImageTile} imageTile Image tile.
|
||||
* @param {module:ol/ImageTile~ImageTile} imageTile Image tile.
|
||||
* @param {string} src Source.
|
||||
*/
|
||||
function defaultTileLoadFunction(imageTile, src) {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -25,7 +25,7 @@ const TierSizeCalculation = {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.ImageTile}
|
||||
* @extends {module:ol/ImageTile~ImageTile}
|
||||
* @param {module:ol/tilegrid/TileGrid~TileGrid} tileGrid TileGrid that the tile belongs to.
|
||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
||||
* @param {module:ol/TileState~TileState} state State.
|
||||
|
||||
Reference in New Issue
Block a user