Shorter module paths for default exports

This commit is contained in:
ahocevar
2018-04-25 17:23:56 +02:00
parent 6cb115d6a4
commit 440d1ad3e1
233 changed files with 2136 additions and 2042 deletions

View File

@@ -11,14 +11,14 @@ import FormatType from './format/FormatType.js';
*
* This function takes an {@link module:ol/extent~Extent} representing the area to be loaded,
* a `{number}` representing the resolution (map units per pixel) and an
* {@link module:ol/proj/Projection~Projection} for the projection as
* {@link module:ol/proj/Projection} for the projection as
* arguments. `this` within the function is bound to the
* {@link module:ol/source/Vector~Vector} it's called from.
*
* The function is responsible for loading the features and adding them to the
* source.
* @typedef {function(this:module:ol/source/Vector~Vector, module:ol/extent~Extent, number,
* module:ol/proj/Projection~Projection)} FeatureLoader
* module:ol/proj/Projection)} FeatureLoader
* @api
*/
@@ -29,20 +29,20 @@ import FormatType from './format/FormatType.js';
*
* This function takes an {@link module:ol/extent~Extent} representing the area
* to be loaded, a `{number}` representing the resolution (map units per pixel)
* and an {@link module:ol/proj/Projection~Projection} for the projection as
* and an {@link module:ol/proj/Projection} for the projection as
* arguments and returns a `{string}` representing the URL.
* @typedef {function(module:ol/extent~Extent, number, module:ol/proj/Projection~Projection): string} FeatureUrlFunction
* @typedef {function(module:ol/extent~Extent, number, module:ol/proj/Projection): string} FeatureUrlFunction
* @api
*/
/**
* @param {string|module:ol/featureloader~FeatureUrlFunction} url Feature URL service.
* @param {module:ol/format/Feature~FeatureFormat} format Feature format.
* @param {function(this:module:ol/VectorTile~VectorTile, Array.<module:ol/Feature~Feature>, module:ol/proj/Projection~Projection, module:ol/extent~Extent)|function(this:module:ol/source/Vector~Vector, Array.<module:ol/Feature~Feature>)} success
* @param {module:ol/format/Feature} format Feature format.
* @param {function(this:module:ol/VectorTile, Array.<module:ol/Feature>, module:ol/proj/Projection, module:ol/extent~Extent)|function(this:module:ol/source/Vector~Vector, Array.<module:ol/Feature>)} success
* Function called with the loaded features and optionally with the data
* projection. Called with the vector tile or source as `this`.
* @param {function(this:module:ol/VectorTile~VectorTile)|function(this:module:ol/source/Vector~Vector)} failure
* @param {function(this:module:ol/VectorTile)|function(this:module:ol/source/Vector~Vector)} failure
* Function called when loading failed. Called with the vector tile or
* source as `this`.
* @return {module:ol/featureloader~FeatureLoader} The feature loader.
@@ -52,8 +52,8 @@ export function loadFeaturesXhr(url, format, success, failure) {
/**
* @param {module:ol/extent~Extent} extent Extent.
* @param {number} resolution Resolution.
* @param {module:ol/proj/Projection~Projection} projection Projection.
* @this {module:ol/source/Vector~Vector|module:ol/VectorTile~VectorTile}
* @param {module:ol/proj/Projection} projection Projection.
* @this {module:ol/source/Vector~Vector|module:ol/VectorTile}
*/
function(extent, resolution, projection) {
const xhr = new XMLHttpRequest();
@@ -111,15 +111,15 @@ export function loadFeaturesXhr(url, format, success, failure) {
* loads features (with XHR), parses the features, and adds them to the
* vector source.
* @param {string|module:ol/featureloader~FeatureUrlFunction} url Feature URL service.
* @param {module:ol/format/Feature~FeatureFormat} format Feature format.
* @param {module:ol/format/Feature} format Feature format.
* @return {module:ol/featureloader~FeatureLoader} The feature loader.
* @api
*/
export function xhr(url, format) {
return loadFeaturesXhr(url, format,
/**
* @param {Array.<module:ol/Feature~Feature>} features The loaded features.
* @param {module:ol/proj/Projection~Projection} dataProjection Data
* @param {Array.<module:ol/Feature>} features The loaded features.
* @param {module:ol/proj/Projection} dataProjection Data
* projection.
* @this {module:ol/source/Vector~Vector}
*/