diff --git a/src/ol/source/Cluster.js b/src/ol/source/Cluster.js index 34294f6b90..3754df9f36 100644 --- a/src/ol/source/Cluster.js +++ b/src/ol/source/Cluster.js @@ -16,7 +16,7 @@ import VectorSource from '../source/Vector.js'; * @typedef {Object} Options * @property {import("./Source.js").AttributionLike} [attributions] Attributions. * @property {number} [distance=20] Minimum distance in pixels between clusters. - * @property {function(import("../Feature.js").default):import("../geom/Point.js").default} [geometryFunction] + * @property {function(Feature):Point} [geometryFunction] * Function that takes an {@link module:ol/Feature} as argument and returns an * {@link module:ol/geom/Point} as cluster calculation point for the feature. When a * feature should not be considered for clustering, the function should return @@ -29,7 +29,7 @@ import VectorSource from '../source/Vector.js'; * ``` * See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster * calculation point for polygons. - * @property {import("./Vector.js").default} source Source. + * @property {VectorSource} source Source. * @property {boolean} [wrapX=true] Whether to wrap the world horizontally. */ @@ -64,25 +64,25 @@ class Cluster extends VectorSource { this.distance = options.distance !== undefined ? options.distance : 20; /** - * @type {Array} + * @type {Array} * @protected */ this.features = []; /** - * @param {import("../Feature.js").default} feature Feature. - * @return {import("../geom/Point.js").default} Cluster calculation point. + * @param {Feature} feature Feature. + * @return {Point} Cluster calculation point. * @protected */ this.geometryFunction = options.geometryFunction || function(feature) { - const geometry = /** @type {import("../geom/Point.js").default} */ (feature.getGeometry()); + const geometry = /** @type {Point} */ (feature.getGeometry()); assert(geometry instanceof Point, - 10); // The default `geometryFunction` can only handle `import("../geom/Point.js").Point` geometries + 10); // The default `geometryFunction` can only handle `Point` geometries return geometry; }; /** - * @type {import("./Vector.js").default} + * @type {VectorSource} * @protected */ this.source = options.source; @@ -101,7 +101,7 @@ class Cluster extends VectorSource { /** * Get a reference to the wrapped source. - * @return {import("./Vector.js").default} Source. + * @return {VectorSource} Source. * @api */ getSource() { @@ -185,8 +185,8 @@ class Cluster extends VectorSource { } /** - * @param {Array} features Features - * @return {import("../Feature.js").default} The cluster feature. + * @param {Array} features Features + * @return {Feature} The cluster feature. * @protected */ createCluster(features) {