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

@@ -44,7 +44,7 @@ import {get as getProjection} from '../proj.js';
* Feature format for reading data in the TopoJSON format.
*
* @constructor
* @extends {module:ol/format/JSONFeature~JSONFeature}
* @extends {module:ol/format/JSONFeature}
* @param {module:ol/format/TopoJSON~Options=} opt_options Options.
* @api
*/
@@ -80,7 +80,7 @@ inherits(TopoJSON, JSONFeature);
/**
* @const
* @type {Object.<string, function(TopoJSONGeometry, Array, ...Array): module:ol/geom/Geometry~Geometry>}
* @type {Object.<string, function(TopoJSONGeometry, Array, ...Array): module:ol/geom/Geometry>}
*/
const GEOMETRY_READERS = {
'Point': readPointGeometry,
@@ -133,7 +133,7 @@ function concatenateArcs(indices, arcs) {
* @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<number>} scale Scale for each dimension.
* @param {Array.<number>} translate Translation for each dimension.
* @return {module:ol/geom/Point~Point} Geometry.
* @return {module:ol/geom/Point} Geometry.
*/
function readPointGeometry(object, scale, translate) {
const coordinates = object.coordinates;
@@ -150,7 +150,7 @@ function readPointGeometry(object, scale, translate) {
* @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<number>} scale Scale for each dimension.
* @param {Array.<number>} translate Translation for each dimension.
* @return {module:ol/geom/MultiPoint~MultiPoint} Geometry.
* @return {module:ol/geom/MultiPoint} Geometry.
*/
function readMultiPointGeometry(object, scale, translate) {
const coordinates = object.coordinates;
@@ -168,7 +168,7 @@ function readMultiPointGeometry(object, scale, translate) {
*
* @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs.
* @return {module:ol/geom/LineString~LineString} Geometry.
* @return {module:ol/geom/LineString} Geometry.
*/
function readLineStringGeometry(object, arcs) {
const coordinates = concatenateArcs(object.arcs, arcs);
@@ -181,7 +181,7 @@ function readLineStringGeometry(object, arcs) {
*
* @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs.
* @return {module:ol/geom/MultiLineString~MultiLineString} Geometry.
* @return {module:ol/geom/MultiLineString} Geometry.
*/
function readMultiLineStringGeometry(object, arcs) {
const coordinates = [];
@@ -197,7 +197,7 @@ function readMultiLineStringGeometry(object, arcs) {
*
* @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs.
* @return {module:ol/geom/Polygon~Polygon} Geometry.
* @return {module:ol/geom/Polygon} Geometry.
*/
function readPolygonGeometry(object, arcs) {
const coordinates = [];
@@ -213,7 +213,7 @@ function readPolygonGeometry(object, arcs) {
*
* @param {TopoJSONGeometry} object TopoJSON object.
* @param {Array.<Array.<module:ol/coordinate~Coordinate>>} arcs Array of arcs.
* @return {module:ol/geom/MultiPolygon~MultiPolygon} Geometry.
* @return {module:ol/geom/MultiPolygon} Geometry.
*/
function readMultiPolygonGeometry(object, arcs) {
const coordinates = [];
@@ -243,7 +243,7 @@ function readMultiPolygonGeometry(object, arcs) {
* object to.
* @param {string} name Name of the `Topology`'s child object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {Array.<module:ol/Feature~Feature>} Array of features.
* @return {Array.<module:ol/Feature>} Array of features.
*/
function readFeaturesFromGeometryCollection(collection, arcs, scale, translate, property, name, opt_options) {
const geometries = collection.geometries;
@@ -267,7 +267,7 @@ function readFeaturesFromGeometryCollection(collection, arcs, scale, translate,
* object to.
* @param {string} name Name of the `Topology`'s child object.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/Feature~Feature} Feature.
* @return {module:ol/Feature} Feature.
*/
function readFeatureFromGeometry(object, arcs, scale, translate, property, name, opt_options) {
let geometry;
@@ -279,7 +279,7 @@ function readFeatureFromGeometry(object, arcs, scale, translate, property, name,
geometry = geometryReader(object, arcs);
}
const feature = new Feature();
feature.setGeometry(/** @type {module:ol/geom/Geometry~Geometry} */ (
feature.setGeometry(/** @type {module:ol/geom/Geometry} */ (
transformWithOptions(geometry, false, opt_options)));
if (object.id !== undefined) {
feature.setId(object.id);
@@ -303,7 +303,7 @@ function readFeatureFromGeometry(object, arcs, scale, translate, property, name,
*
* @function
* @param {Document|Node|Object|string} source Source.
* @return {Array.<module:ol/Feature~Feature>} Features.
* @return {Array.<module:ol/Feature>} Features.
* @api
*/
TopoJSON.prototype.readFeatures;
@@ -325,7 +325,7 @@ TopoJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
if (transform) {
transformArcs(arcs, scale, translate);
}
/** @type {Array.<module:ol/Feature~Feature>} */
/** @type {Array.<module:ol/Feature>} */
const features = [];
const topoJSONFeatures = topoJSONTopology.objects;
const property = this.layerName_;
@@ -405,7 +405,7 @@ function transformVertex(vertex, scale, translate) {
* Read the projection from a TopoJSON source.
*
* @param {Document|Node|Object|string} object Source.
* @return {module:ol/proj/Projection~Projection} Projection.
* @return {module:ol/proj/Projection} Projection.
* @override
* @api
*/