Transformed types

Using the [ts.js codemod](https://gist.github.com/tschaub/1ea498c9d1e5268cf36d212b3949be4e):

    jscodeshift --transform ts.js src
This commit is contained in:
Tim Schaub
2018-09-05 08:05:29 -06:00
parent f2aaaa19e1
commit ccfacc5ee6
239 changed files with 3999 additions and 3999 deletions
+10 -10
View File
@@ -15,11 +15,11 @@ import {deflateCoordinate} from '../geom/flat/deflate.js';
class Circle extends SimpleGeometry {
/**
* @param {!module:ol/coordinate~Coordinate} center Center.
* @param {!import("../coordinate.js").Coordinate} center Center.
* For internal use, flat coordinates in combination with `opt_layout` and no
* `opt_radius` are also accepted.
* @param {number=} opt_radius Radius.
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
*/
constructor(center, opt_radius, opt_layout) {
super();
@@ -33,7 +33,7 @@ class Circle extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/Circle} Clone.
* @return {!import("./Circle.js").default} Clone.
* @override
* @api
*/
@@ -81,7 +81,7 @@ class Circle extends SimpleGeometry {
/**
* Return the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.
* @return {module:ol/coordinate~Coordinate} Center.
* @return {import("../coordinate.js").Coordinate} Center.
* @api
*/
getCenter() {
@@ -151,7 +151,7 @@ class Circle extends SimpleGeometry {
/**
* Set the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.
* @param {module:ol/coordinate~Coordinate} center Center.
* @param {import("../coordinate.js").Coordinate} center Center.
* @api
*/
setCenter(center) {
@@ -169,9 +169,9 @@ class Circle extends SimpleGeometry {
/**
* Set the center (as {@link module:ol/coordinate~Coordinate coordinate}) and the radius (as
* number) of the circle.
* @param {!module:ol/coordinate~Coordinate} center Center.
* @param {!import("../coordinate.js").Coordinate} center Center.
* @param {number} radius Radius.
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @api
*/
setCenterAndRadius(center, radius, opt_layout) {
@@ -226,11 +226,11 @@ class Circle extends SimpleGeometry {
* correspond to the shape that would be obtained by transforming every point
* of the original circle.
*
* @param {module:ol/proj~ProjectionLike} source The current projection. Can be a
* @param {import("../proj.js").ProjectionLike} source The current projection. Can be a
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @param {module:ol/proj~ProjectionLike} destination The desired projection. Can be a
* @param {import("../proj.js").ProjectionLike} destination The desired projection. Can be a
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @return {module:ol/geom/Circle} This geometry. Note that original geometry is
* @return {import("./Circle.js").default} This geometry. Note that original geometry is
* modified in place.
* @function
* @api
+23 -23
View File
@@ -11,7 +11,7 @@ import {create as createTransform, compose as composeTransform} from '../transfo
/**
* @type {module:ol/transform~Transform}
* @type {import("../transform.js").Transform}
*/
const tmpTransform = createTransform();
@@ -35,7 +35,7 @@ class Geometry extends BaseObject {
/**
* @private
* @type {module:ol/extent~Extent}
* @type {import("../extent.js").Extent}
*/
this.extent_ = createEmpty();
@@ -47,7 +47,7 @@ class Geometry extends BaseObject {
/**
* @protected
* @type {Object<string, module:ol/geom/Geometry>}
* @type {Object<string, import("./Geometry.js").default>}
*/
this.simplifiedGeometryCache = {};
@@ -68,7 +68,7 @@ class Geometry extends BaseObject {
/**
* Make a complete copy of the geometry.
* @abstract
* @return {!module:ol/geom/Geometry} Clone.
* @return {!import("./Geometry.js").default} Clone.
*/
clone() {}
@@ -76,7 +76,7 @@ class Geometry extends BaseObject {
* @abstract
* @param {number} x X.
* @param {number} y Y.
* @param {module:ol/coordinate~Coordinate} closestPoint Closest point.
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @return {number} Minimum squared distance.
*/
@@ -85,9 +85,9 @@ class Geometry extends BaseObject {
/**
* Return the closest point of the geometry to the passed point as
* {@link module:ol/coordinate~Coordinate coordinate}.
* @param {module:ol/coordinate~Coordinate} point Point.
* @param {module:ol/coordinate~Coordinate=} opt_closestPoint Closest point.
* @return {module:ol/coordinate~Coordinate} Closest point.
* @param {import("../coordinate.js").Coordinate} point Point.
* @param {import("../coordinate.js").Coordinate=} opt_closestPoint Closest point.
* @return {import("../coordinate.js").Coordinate} Closest point.
* @api
*/
getClosestPoint(point, opt_closestPoint) {
@@ -99,7 +99,7 @@ class Geometry extends BaseObject {
/**
* Returns true if this geometry includes the specified coordinate. If the
* coordinate is on the boundary of the geometry, returns false.
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
* @return {boolean} Contains coordinate.
* @api
*/
@@ -109,16 +109,16 @@ class Geometry extends BaseObject {
/**
* @abstract
* @param {module:ol/extent~Extent} extent Extent.
* @param {import("../extent.js").Extent} extent Extent.
* @protected
* @return {module:ol/extent~Extent} extent Extent.
* @return {import("../extent.js").Extent} extent Extent.
*/
computeExtent(extent) {}
/**
* Get the extent of the geometry.
* @param {module:ol/extent~Extent=} opt_extent Extent.
* @return {module:ol/extent~Extent} extent Extent.
* @param {import("../extent.js").Extent=} opt_extent Extent.
* @return {import("../extent.js").Extent} extent Extent.
* @api
*/
getExtent(opt_extent) {
@@ -134,7 +134,7 @@ class Geometry extends BaseObject {
* coordinates in place.
* @abstract
* @param {number} angle Rotation angle in radians.
* @param {module:ol/coordinate~Coordinate} anchor The rotation center.
* @param {import("../coordinate.js").Coordinate} anchor The rotation center.
* @api
*/
rotate(angle, anchor) {}
@@ -146,7 +146,7 @@ class Geometry extends BaseObject {
* @param {number} sx The scaling factor in the x-direction.
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to
* sx).
* @param {module:ol/coordinate~Coordinate=} opt_anchor The scale origin (defaults to the center
* @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center
* of the geometry extent).
* @api
*/
@@ -160,7 +160,7 @@ class Geometry extends BaseObject {
* simplification is used to preserve topology.
* @function
* @param {number} tolerance The tolerance distance for simplification.
* @return {module:ol/geom/Geometry} A new, simplified version of the original
* @return {import("./Geometry.js").default} A new, simplified version of the original
* geometry.
* @api
*/
@@ -174,14 +174,14 @@ class Geometry extends BaseObject {
* See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.
* @abstract
* @param {number} squaredTolerance Squared tolerance.
* @return {module:ol/geom/Geometry} Simplified geometry.
* @return {import("./Geometry.js").default} Simplified geometry.
*/
getSimplifiedGeometry(squaredTolerance) {}
/**
* Get the type of this geometry.
* @abstract
* @return {module:ol/geom/GeometryType} Geometry type.
* @return {import("./GeometryType.js").default} Geometry type.
*/
getType() {}
@@ -191,14 +191,14 @@ class Geometry extends BaseObject {
* If you do not want the geometry modified in place, first `clone()` it and
* then use this function on the clone.
* @abstract
* @param {module:ol/proj~TransformFunction} transformFn Transform.
* @param {import("../proj.js").TransformFunction} transformFn Transform.
*/
applyTransform(transformFn) {}
/**
* Test if the geometry and the passed extent intersect.
* @abstract
* @param {module:ol/extent~Extent} extent Extent.
* @param {import("../extent.js").Extent} extent Extent.
* @return {boolean} `true` if the geometry and the extent intersect.
*/
intersectsExtent(extent) {}
@@ -220,11 +220,11 @@ class Geometry extends BaseObject {
* If you do not want the geometry modified in place, first `clone()` it and
* then use this function on the clone.
*
* @param {module:ol/proj~ProjectionLike} source The current projection. Can be a
* @param {import("../proj.js").ProjectionLike} source The current projection. Can be a
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @param {module:ol/proj~ProjectionLike} destination The desired projection. Can be a
* @param {import("../proj.js").ProjectionLike} destination The desired projection. Can be a
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @return {module:ol/geom/Geometry} This geometry. Note that original geometry is
* @return {import("./Geometry.js").default} This geometry. Note that original geometry is
* modified in place.
* @api
*/
+9 -9
View File
@@ -17,7 +17,7 @@ import {clear} from '../obj.js';
class GeometryCollection extends Geometry {
/**
* @param {Array<module:ol/geom/Geometry>=} opt_geometries Geometries.
* @param {Array<import("./Geometry.js").default>=} opt_geometries Geometries.
*/
constructor(opt_geometries) {
@@ -25,7 +25,7 @@ class GeometryCollection extends Geometry {
/**
* @private
* @type {Array<module:ol/geom/Geometry>}
* @type {Array<import("./Geometry.js").default>}
*/
this.geometries_ = opt_geometries ? opt_geometries : null;
@@ -62,7 +62,7 @@ class GeometryCollection extends Geometry {
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/GeometryCollection} Clone.
* @return {!import("./GeometryCollection.js").default} Clone.
* @override
* @api
*/
@@ -114,7 +114,7 @@ class GeometryCollection extends Geometry {
/**
* Return the geometries that make up this geometry collection.
* @return {Array<module:ol/geom/Geometry>} Geometries.
* @return {Array<import("./Geometry.js").default>} Geometries.
* @api
*/
getGeometries() {
@@ -122,7 +122,7 @@ class GeometryCollection extends Geometry {
}
/**
* @return {Array<module:ol/geom/Geometry>} Geometries.
* @return {Array<import("./Geometry.js").default>} Geometries.
*/
getGeometriesArray() {
return this.geometries_;
@@ -228,7 +228,7 @@ class GeometryCollection extends Geometry {
/**
* Set the geometries that make up this geometry collection.
* @param {Array<module:ol/geom/Geometry>} geometries Geometries.
* @param {Array<import("./Geometry.js").default>} geometries Geometries.
* @api
*/
setGeometries(geometries) {
@@ -236,7 +236,7 @@ class GeometryCollection extends Geometry {
}
/**
* @param {Array<module:ol/geom/Geometry>} geometries Geometries.
* @param {Array<import("./Geometry.js").default>} geometries Geometries.
*/
setGeometriesArray(geometries) {
this.unlistenGeometriesChange_();
@@ -280,8 +280,8 @@ class GeometryCollection extends Geometry {
/**
* @param {Array<module:ol/geom/Geometry>} geometries Geometries.
* @return {Array<module:ol/geom/Geometry>} Cloned geometries.
* @param {Array<import("./Geometry.js").default>} geometries Geometries.
* @return {Array<import("./Geometry.js").default>} Cloned geometries.
*/
function cloneGeometries(geometries) {
const clonedGeometries = [];
+12 -12
View File
@@ -24,9 +24,9 @@ import {douglasPeucker} from '../geom/flat/simplify.js';
class LineString extends SimpleGeometry {
/**
* @param {Array<module:ol/coordinate~Coordinate>|Array<number>} coordinates Coordinates.
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` are also accepted.
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
*/
constructor(coordinates, opt_layout) {
@@ -34,7 +34,7 @@ class LineString extends SimpleGeometry {
/**
* @private
* @type {module:ol/coordinate~Coordinate}
* @type {import("../coordinate.js").Coordinate}
*/
this.flatMidpoint_ = null;
@@ -66,7 +66,7 @@ class LineString extends SimpleGeometry {
/**
* Append the passed coordinate to the coordinates of the linestring.
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
* @api
*/
appendCoordinate(coordinate) {
@@ -80,7 +80,7 @@ class LineString extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/LineString} Clone.
* @return {!import("./LineString.js").default} Clone.
* @override
* @api
*/
@@ -110,7 +110,7 @@ class LineString extends SimpleGeometry {
* If the callback returns a truthy value the function returns that
* value immediately. Otherwise the function returns `false`.
*
* @param {function(this: S, module:ol/coordinate~Coordinate, module:ol/coordinate~Coordinate): T} callback Function
* @param {function(this: S, import("../coordinate.js").Coordinate, import("../coordinate.js").Coordinate): T} callback Function
* called for each segment.
* @return {T|boolean} Value.
* @template T,S
@@ -131,7 +131,7 @@ class LineString extends SimpleGeometry {
*
* @param {number} m M.
* @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.
* @return {module:ol/coordinate~Coordinate} Coordinate.
* @return {import("../coordinate.js").Coordinate} Coordinate.
* @api
*/
getCoordinateAtM(m, opt_extrapolate) {
@@ -146,7 +146,7 @@ class LineString extends SimpleGeometry {
/**
* Return the coordinates of the linestring.
* @return {Array<module:ol/coordinate~Coordinate>} Coordinates.
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
* @override
* @api
*/
@@ -160,9 +160,9 @@ class LineString extends SimpleGeometry {
* The `fraction` is a number between 0 and 1, where 0 is the start of the
* linestring and 1 is the end.
* @param {number} fraction Fraction.
* @param {module:ol/coordinate~Coordinate=} opt_dest Optional coordinate whose values will
* @param {import("../coordinate.js").Coordinate=} opt_dest Optional coordinate whose values will
* be modified. If not provided, a new coordinate will be returned.
* @return {module:ol/coordinate~Coordinate} Coordinate of the interpolated point.
* @return {import("../coordinate.js").Coordinate} Coordinate of the interpolated point.
* @api
*/
getCoordinateAt(fraction, opt_dest) {
@@ -223,8 +223,8 @@ class LineString extends SimpleGeometry {
/**
* Set the coordinates of the linestring.
* @param {!Array<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @override
* @api
*/
+6 -6
View File
@@ -21,9 +21,9 @@ import {douglasPeucker} from '../geom/flat/simplify.js';
class LinearRing extends SimpleGeometry {
/**
* @param {Array<module:ol/coordinate~Coordinate>|Array<number>} coordinates Coordinates.
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` are also accepted.
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
*/
constructor(coordinates, opt_layout) {
@@ -51,7 +51,7 @@ class LinearRing extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/LinearRing} Clone.
* @return {!import("./LinearRing.js").default} Clone.
* @override
* @api
*/
@@ -87,7 +87,7 @@ class LinearRing extends SimpleGeometry {
/**
* Return the coordinates of the linear ring.
* @return {Array<module:ol/coordinate~Coordinate>} Coordinates.
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
* @override
* @api
*/
@@ -122,8 +122,8 @@ class LinearRing extends SimpleGeometry {
/**
* Set the coordinates of the linear ring.
* @param {!Array<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @override
* @api
*/
+11 -11
View File
@@ -23,10 +23,10 @@ import {douglasPeuckerArray} from '../geom/flat/simplify.js';
class MultiLineString extends SimpleGeometry {
/**
* @param {Array<Array<module:ol/coordinate~Coordinate>|module:ol/geom~MultiLineString>|Array<number>} coordinates
* @param {Array<Array<import("../coordinate.js").Coordinate>|import("../geom.js").MultiLineString>|Array<number>} coordinates
* Coordinates or LineString geometries. (For internal use, flat coordinates in
* combination with `opt_layout` and `opt_ends` are also accepted.)
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {Array<number>} opt_ends Flat coordinate ends for internal use.
*/
constructor(coordinates, opt_layout, opt_ends) {
@@ -76,7 +76,7 @@ class MultiLineString extends SimpleGeometry {
/**
* Append the passed linestring to the multilinestring.
* @param {module:ol/geom/LineString} lineString LineString.
* @param {import("./LineString.js").default} lineString LineString.
* @api
*/
appendLineString(lineString) {
@@ -91,7 +91,7 @@ class MultiLineString extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/MultiLineString} Clone.
* @return {!import("./MultiLineString.js").default} Clone.
* @override
* @api
*/
@@ -135,7 +135,7 @@ class MultiLineString extends SimpleGeometry {
* @param {number} m M.
* @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.
* @param {boolean=} opt_interpolate Interpolate. Default is `false`.
* @return {module:ol/coordinate~Coordinate} Coordinate.
* @return {import("../coordinate.js").Coordinate} Coordinate.
* @api
*/
getCoordinateAtM(m, opt_extrapolate, opt_interpolate) {
@@ -152,7 +152,7 @@ class MultiLineString extends SimpleGeometry {
/**
* Return the coordinates of the multilinestring.
* @return {Array<Array<module:ol/coordinate~Coordinate>>} Coordinates.
* @return {Array<Array<import("../coordinate.js").Coordinate>>} Coordinates.
* @override
* @api
*/
@@ -171,7 +171,7 @@ class MultiLineString extends SimpleGeometry {
/**
* Return the linestring at the specified index.
* @param {number} index Index.
* @return {module:ol/geom/LineString} LineString.
* @return {import("./LineString.js").default} LineString.
* @api
*/
getLineString(index) {
@@ -184,14 +184,14 @@ class MultiLineString extends SimpleGeometry {
/**
* Return the linestrings of this multilinestring.
* @return {Array<module:ol/geom/LineString>} LineStrings.
* @return {Array<import("./LineString.js").default>} LineStrings.
* @api
*/
getLineStrings() {
const flatCoordinates = this.flatCoordinates;
const ends = this.ends_;
const layout = this.layout;
/** @type {Array<module:ol/geom/LineString>} */
/** @type {Array<import("./LineString.js").default>} */
const lineStrings = [];
let offset = 0;
for (let i = 0, ii = ends.length; i < ii; ++i) {
@@ -253,8 +253,8 @@ class MultiLineString extends SimpleGeometry {
/**
* Set the coordinates of the multilinestring.
* @param {!Array<Array<module:ol/coordinate~Coordinate>>} coordinates Coordinates.
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @override
* @api
*/
+10 -10
View File
@@ -19,9 +19,9 @@ import {squaredDistance as squaredDx} from '../math.js';
class MultiPoint extends SimpleGeometry {
/**
* @param {Array<module:ol/coordinate~Coordinate>|Array<number>} coordinates Coordinates.
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` are also accepted.
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
*/
constructor(coordinates, opt_layout) {
super();
@@ -34,7 +34,7 @@ class MultiPoint extends SimpleGeometry {
/**
* Append the passed point to this multipoint.
* @param {module:ol/geom/Point} point Point.
* @param {import("./Point.js").default} point Point.
* @api
*/
appendPoint(point) {
@@ -48,7 +48,7 @@ class MultiPoint extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/MultiPoint} Clone.
* @return {!import("./MultiPoint.js").default} Clone.
* @override
* @api
*/
@@ -82,7 +82,7 @@ class MultiPoint extends SimpleGeometry {
/**
* Return the coordinates of the multipoint.
* @return {Array<module:ol/coordinate~Coordinate>} Coordinates.
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
* @override
* @api
*/
@@ -94,7 +94,7 @@ class MultiPoint extends SimpleGeometry {
/**
* Return the point at the specified index.
* @param {number} index Index.
* @return {module:ol/geom/Point} Point.
* @return {import("./Point.js").default} Point.
* @api
*/
getPoint(index) {
@@ -108,14 +108,14 @@ class MultiPoint extends SimpleGeometry {
/**
* Return the points of this multipoint.
* @return {Array<module:ol/geom/Point>} Points.
* @return {Array<import("./Point.js").default>} Points.
* @api
*/
getPoints() {
const flatCoordinates = this.flatCoordinates;
const layout = this.layout;
const stride = this.stride;
/** @type {Array<module:ol/geom/Point>} */
/** @type {Array<import("./Point.js").default>} */
const points = [];
for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
const point = new Point(flatCoordinates.slice(i, i + stride), layout);
@@ -151,8 +151,8 @@ class MultiPoint extends SimpleGeometry {
/**
* Set the coordinates of the multipoint.
* @param {!Array<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @override
* @api
*/
+10 -10
View File
@@ -28,9 +28,9 @@ import {quantizeMultiArray} from '../geom/flat/simplify.js';
class MultiPolygon extends SimpleGeometry {
/**
* @param {Array<Array<Array<module:ol/coordinate~Coordinate>>>|Array<number>} coordinates Coordinates.
* @param {Array<Array<Array<import("../coordinate.js").Coordinate>>>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinats in combination with `opt_layout` and `opt_endss` are also accepted.
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {Array<number>} opt_endss Array of ends for internal use with flat coordinates.
*/
constructor(coordinates, opt_layout, opt_endss) {
@@ -111,7 +111,7 @@ class MultiPolygon extends SimpleGeometry {
/**
* Append the passed polygon to this multipolygon.
* @param {module:ol/geom/Polygon} polygon Polygon.
* @param {import("./Polygon.js").default} polygon Polygon.
* @api
*/
appendPolygon(polygon) {
@@ -135,7 +135,7 @@ class MultiPolygon extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/MultiPolygon} Clone.
* @return {!import("./MultiPolygon.js").default} Clone.
* @override
* @api
*/
@@ -193,7 +193,7 @@ class MultiPolygon extends SimpleGeometry {
* (clockwise for exterior and counter-clockwise for interior rings).
* By default, coordinate orientation will depend on how the geometry was
* constructed.
* @return {Array<Array<Array<module:ol/coordinate~Coordinate>>>} Coordinates.
* @return {Array<Array<Array<import("../coordinate.js").Coordinate>>>} Coordinates.
* @override
* @api
*/
@@ -235,7 +235,7 @@ class MultiPolygon extends SimpleGeometry {
/**
* Return the interior points as {@link module:ol/geom/MultiPoint multipoint}.
* @return {module:ol/geom/MultiPoint} Interior points as XYM coordinates, where M is
* @return {import("./MultiPoint.js").default} Interior points as XYM coordinates, where M is
* the length of the horizontal intersection that the point belongs to.
* @api
*/
@@ -279,7 +279,7 @@ class MultiPolygon extends SimpleGeometry {
/**
* Return the polygon at the specified index.
* @param {number} index Index.
* @return {module:ol/geom/Polygon} Polygon.
* @return {import("./Polygon.js").default} Polygon.
* @api
*/
getPolygon(index) {
@@ -305,7 +305,7 @@ class MultiPolygon extends SimpleGeometry {
/**
* Return the polygons of this multipolygon.
* @return {Array<module:ol/geom/Polygon>} Polygons.
* @return {Array<import("./Polygon.js").default>} Polygons.
* @api
*/
getPolygons() {
@@ -348,8 +348,8 @@ class MultiPolygon extends SimpleGeometry {
/**
* Set the coordinates of the multipolygon.
* @param {!Array<Array<Array<module:ol/coordinate~Coordinate>>>} coordinates Coordinates.
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {!Array<Array<Array<import("../coordinate.js").Coordinate>>>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @override
* @api
*/
+4 -4
View File
@@ -16,8 +16,8 @@ import {squaredDistance as squaredDx} from '../math.js';
class Point extends SimpleGeometry {
/**
* @param {module:ol/coordinate~Coordinate} coordinates Coordinates.
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {import("../coordinate.js").Coordinate} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
*/
constructor(coordinates, opt_layout) {
super();
@@ -26,7 +26,7 @@ class Point extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/Point} Clone.
* @return {!import("./Point.js").default} Clone.
* @override
* @api
*/
@@ -55,7 +55,7 @@ class Point extends SimpleGeometry {
/**
* Return the coordinate of the point.
* @return {module:ol/coordinate~Coordinate} Coordinates.
* @return {import("../coordinate.js").Coordinate} Coordinates.
* @override
* @api
*/
+19 -19
View File
@@ -29,14 +29,14 @@ import {modulo} from '../math.js';
class Polygon extends SimpleGeometry {
/**
* @param {!Array<Array<module:ol/coordinate~Coordinate>>|!Array<number>} coordinates
* @param {!Array<Array<import("../coordinate.js").Coordinate>>|!Array<number>} coordinates
* Array of linear rings that define the polygon. The first linear ring of the
* array defines the outer-boundary or surface of the polygon. Each subsequent
* linear ring defines a hole in the surface of the polygon. A linear ring is
* an array of vertices' coordinates where the first coordinate and the last are
* equivalent. (For internal use, flat coordinates in combination with
* `opt_layout` and `opt_ends` are also accepted.)
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {Array<number>=} opt_ends Ends (for internal use with flat coordinates).
*/
constructor(coordinates, opt_layout, opt_ends) {
@@ -57,7 +57,7 @@ class Polygon extends SimpleGeometry {
/**
* @private
* @type {module:ol/coordinate~Coordinate}
* @type {import("../coordinate.js").Coordinate}
*/
this.flatInteriorPoint_ = null;
@@ -96,7 +96,7 @@ class Polygon extends SimpleGeometry {
/**
* Append the passed linear ring to this polygon.
* @param {module:ol/geom/LinearRing} linearRing Linear ring.
* @param {import("./LinearRing.js").default} linearRing Linear ring.
* @api
*/
appendLinearRing(linearRing) {
@@ -111,7 +111,7 @@ class Polygon extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!module:ol/geom/Polygon} Clone.
* @return {!import("./Polygon.js").default} Clone.
* @override
* @api
*/
@@ -162,7 +162,7 @@ class Polygon extends SimpleGeometry {
* (clockwise for exterior and counter-clockwise for interior rings).
* By default, coordinate orientation will depend on how the geometry was
* constructed.
* @return {Array<Array<module:ol/coordinate~Coordinate>>} Coordinates.
* @return {Array<Array<import("../coordinate.js").Coordinate>>} Coordinates.
* @override
* @api
*/
@@ -203,7 +203,7 @@ class Polygon extends SimpleGeometry {
/**
* Return an interior point of the polygon.
* @return {module:ol/geom/Point} Interior point as XYM coordinate, where M is the
* @return {import("./Point.js").default} Interior point as XYM coordinate, where M is the
* length of the horizontal intersection that the point belongs to.
* @api
*/
@@ -229,7 +229,7 @@ class Polygon extends SimpleGeometry {
* at index `1` and beyond.
*
* @param {number} index Index.
* @return {module:ol/geom/LinearRing} Linear ring.
* @return {import("./LinearRing.js").default} Linear ring.
* @api
*/
getLinearRing(index) {
@@ -242,7 +242,7 @@ class Polygon extends SimpleGeometry {
/**
* Return the linear rings of the polygon.
* @return {Array<module:ol/geom/LinearRing>} Linear rings.
* @return {Array<import("./LinearRing.js").default>} Linear rings.
* @api
*/
getLinearRings() {
@@ -312,8 +312,8 @@ class Polygon extends SimpleGeometry {
/**
* Set the coordinates of the polygon.
* @param {!Array<Array<module:ol/coordinate~Coordinate>>} coordinates Coordinates.
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @override
* @api
*/
@@ -335,14 +335,14 @@ export default Polygon;
/**
* Create an approximation of a circle on the surface of a sphere.
* @param {module:ol/coordinate~Coordinate} center Center (`[lon, lat]` in degrees).
* @param {import("../coordinate.js").Coordinate} center Center (`[lon, lat]` in degrees).
* @param {number} radius The great-circle distance from the center to
* the polygon vertices.
* @param {number=} opt_n Optional number of vertices for the resulting
* polygon. Default is `32`.
* @param {number=} opt_sphereRadius Optional radius for the sphere (defaults to
* the Earth's mean radius using the WGS84 ellipsoid).
* @return {module:ol/geom/Polygon} The "circular" polygon.
* @return {import("./Polygon.js").default} The "circular" polygon.
* @api
*/
export function circular(center, radius, opt_n, opt_sphereRadius) {
@@ -359,8 +359,8 @@ export function circular(center, radius, opt_n, opt_sphereRadius) {
/**
* Create a polygon from an extent. The layout used is `XY`.
* @param {module:ol/extent~Extent} extent The extent.
* @return {module:ol/geom/Polygon} The polygon.
* @param {import("../extent.js").Extent} extent The extent.
* @return {import("./Polygon.js").default} The polygon.
* @api
*/
export function fromExtent(extent) {
@@ -376,11 +376,11 @@ export function fromExtent(extent) {
/**
* Create a regular polygon from a circle.
* @param {module:ol/geom/Circle} circle Circle geometry.
* @param {import("./Circle.js").default} circle Circle geometry.
* @param {number=} opt_sides Number of sides of the polygon. Default is 32.
* @param {number=} opt_angle Start angle for the first vertex of the polygon in
* radians. Default is 0.
* @return {module:ol/geom/Polygon} Polygon geometry.
* @return {import("./Polygon.js").default} Polygon geometry.
* @api
*/
export function fromCircle(circle, opt_sides, opt_angle) {
@@ -406,8 +406,8 @@ export function fromCircle(circle, opt_sides, opt_angle) {
/**
* Modify the coordinates of a polygon to make it a regular polygon.
* @param {module:ol/geom/Polygon} polygon Polygon geometry.
* @param {module:ol/coordinate~Coordinate} center Center of the regular polygon.
* @param {import("./Polygon.js").default} polygon Polygon geometry.
* @param {import("../coordinate.js").Coordinate} center Center of the regular polygon.
* @param {number} radius Radius of the regular polygon.
* @param {number=} opt_angle Start angle for the first vertex of the polygon in
* radians. Default is 0.
+13 -13
View File
@@ -23,7 +23,7 @@ class SimpleGeometry extends Geometry {
/**
* @protected
* @type {module:ol/geom/GeometryLayout}
* @type {import("./GeometryLayout.js").default}
*/
this.layout = GeometryLayout.XY;
@@ -57,7 +57,7 @@ class SimpleGeometry extends Geometry {
/**
* Return the first coordinate of the geometry.
* @return {module:ol/coordinate~Coordinate} First coordinate.
* @return {import("../coordinate.js").Coordinate} First coordinate.
* @api
*/
getFirstCoordinate() {
@@ -73,7 +73,7 @@ class SimpleGeometry extends Geometry {
/**
* Return the last coordinate of the geometry.
* @return {module:ol/coordinate~Coordinate} Last point.
* @return {import("../coordinate.js").Coordinate} Last point.
* @api
*/
getLastCoordinate() {
@@ -82,7 +82,7 @@ class SimpleGeometry extends Geometry {
/**
* Return the {@link module:ol/geom/GeometryLayout~GeometryLayout layout} of the geometry.
* @return {module:ol/geom/GeometryLayout} Layout.
* @return {import("./GeometryLayout.js").default} Layout.
* @api
*/
getLayout() {
@@ -130,7 +130,7 @@ class SimpleGeometry extends Geometry {
/**
* @param {number} squaredTolerance Squared tolerance.
* @return {module:ol/geom/SimpleGeometry} Simplified geometry.
* @return {import("./SimpleGeometry.js").default} Simplified geometry.
* @protected
*/
getSimplifiedGeometryInternal(squaredTolerance) {
@@ -145,7 +145,7 @@ class SimpleGeometry extends Geometry {
}
/**
* @param {module:ol/geom/GeometryLayout} layout Layout.
* @param {import("./GeometryLayout.js").default} layout Layout.
* @param {Array<number>} flatCoordinates Flat coordinates.
*/
setFlatCoordinates(layout, flatCoordinates) {
@@ -157,12 +157,12 @@ class SimpleGeometry extends Geometry {
/**
* @abstract
* @param {!Array} coordinates Coordinates.
* @param {module:ol/geom/GeometryLayout=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
*/
setCoordinates(coordinates, opt_layout) {}
/**
* @param {module:ol/geom/GeometryLayout|undefined} layout Layout.
* @param {import("./GeometryLayout.js").default|undefined} layout Layout.
* @param {Array} coordinates Coordinates.
* @param {number} nesting Nesting.
* @protected
@@ -257,7 +257,7 @@ class SimpleGeometry extends Geometry {
/**
* @param {number} stride Stride.
* @return {module:ol/geom/GeometryLayout} layout Layout.
* @return {import("./GeometryLayout.js").default} layout Layout.
*/
function getLayoutForStride(stride) {
let layout;
@@ -269,13 +269,13 @@ function getLayoutForStride(stride) {
layout = GeometryLayout.XYZM;
}
return (
/** @type {module:ol/geom/GeometryLayout} */ (layout)
/** @type {import("./GeometryLayout.js").default} */ (layout)
);
}
/**
* @param {module:ol/geom/GeometryLayout} layout Layout.
* @param {import("./GeometryLayout.js").default} layout Layout.
* @return {number} Stride.
*/
export function getStrideForLayout(layout) {
@@ -298,8 +298,8 @@ SimpleGeometry.prototype.containsXY = FALSE;
/**
* @param {module:ol/geom/SimpleGeometry} simpleGeometry Simple geometry.
* @param {module:ol/transform~Transform} transform Transform.
* @param {import("./SimpleGeometry.js").default} simpleGeometry Simple geometry.
* @param {import("../transform.js").Transform} transform Transform.
* @param {Array<number>=} opt_dest Destination.
* @return {Array<number>} Transformed flat coordinates.
*/
+2 -2
View File
@@ -9,13 +9,13 @@ import {forEachCorner} from '../../extent.js';
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {module:ol/extent~Extent} extent Extent.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} Contains extent.
*/
export function linearRingContainsExtent(flatCoordinates, offset, end, stride, extent) {
const outside = forEachCorner(extent,
/**
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
* @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
* @return {boolean} Contains (x, y).
*/
function(coordinate) {
+4 -4
View File
@@ -6,7 +6,7 @@
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
* @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
* @param {number} stride Stride.
* @return {number} offset Offset.
*/
@@ -21,7 +21,7 @@ export function deflateCoordinate(flatCoordinates, offset, coordinate, stride) {
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<module:ol/coordinate~Coordinate>} coordinates Coordinates.
* @param {Array<import("../../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {number} stride Stride.
* @return {number} offset Offset.
*/
@@ -39,7 +39,7 @@ export function deflateCoordinates(flatCoordinates, offset, coordinates, stride)
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<module:ol/coordinate~Coordinate>>} coordinatess Coordinatess.
* @param {Array<Array<import("../../coordinate.js").Coordinate>>} coordinatess Coordinatess.
* @param {number} stride Stride.
* @param {Array<number>=} opt_ends Ends.
* @return {Array<number>} Ends.
@@ -61,7 +61,7 @@ export function deflateCoordinatesArray(flatCoordinates, offset, coordinatess, s
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<Array<module:ol/coordinate~Coordinate>>>} coordinatesss Coordinatesss.
* @param {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} coordinatesss Coordinatesss.
* @param {number} stride Stride.
* @param {Array<Array<number>>=} opt_endss Endss.
* @return {Array<Array<number>>} Endss.
+10 -10
View File
@@ -6,8 +6,8 @@ import {get as getProjection, getTransform} from '../../proj.js';
/**
* @param {function(number): module:ol/coordinate~Coordinate} interpolate Interpolate function.
* @param {module:ol/proj~TransformFunction} transform Transform from longitude/latitude to
* @param {function(number): import("../../coordinate.js").Coordinate} interpolate Interpolate function.
* @param {import("../../proj.js").TransformFunction} transform Transform from longitude/latitude to
* projected coordinates.
* @param {number} squaredTolerance Squared tolerance.
* @return {Array<number>} Flat coordinates.
@@ -25,9 +25,9 @@ function line(interpolate, transform, squaredTolerance) {
let a = transform(geoA);
let b = transform(geoB);
/** @type {Array<module:ol/coordinate~Coordinate>} */
/** @type {Array<import("../../coordinate.js").Coordinate>} */
const geoStack = [geoB, geoA];
/** @type {Array<module:ol/coordinate~Coordinate>} */
/** @type {Array<import("../../coordinate.js").Coordinate>} */
const stack = [b, a];
/** @type {Array<number>} */
const fractionStack = [1, 0];
@@ -84,7 +84,7 @@ function line(interpolate, transform, squaredTolerance) {
* @param {number} lat1 Latitude 1 in degrees.
* @param {number} lon2 Longitude 2 in degrees.
* @param {number} lat2 Latitude 2 in degrees.
* @param {module:ol/proj/Projection} projection Projection.
* @param {import("../../proj/Projection.js").default} projection Projection.
* @param {number} squaredTolerance Squared tolerance.
* @return {Array<number>} Flat coordinates.
*/
@@ -102,7 +102,7 @@ export function greatCircleArc(lon1, lat1, lon2, lat2, projection, squaredTolera
return line(
/**
* @param {number} frac Fraction.
* @return {module:ol/coordinate~Coordinate} Coordinate.
* @return {import("../../coordinate.js").Coordinate} Coordinate.
*/
function(frac) {
if (1 <= d) {
@@ -128,7 +128,7 @@ export function greatCircleArc(lon1, lat1, lon2, lat2, projection, squaredTolera
* @param {number} lon Longitude.
* @param {number} lat1 Latitude 1.
* @param {number} lat2 Latitude 2.
* @param {module:ol/proj/Projection} projection Projection.
* @param {import("../../proj/Projection.js").default} projection Projection.
* @param {number} squaredTolerance Squared tolerance.
* @return {Array<number>} Flat coordinates.
*/
@@ -137,7 +137,7 @@ export function meridian(lon, lat1, lat2, projection, squaredTolerance) {
return line(
/**
* @param {number} frac Fraction.
* @return {module:ol/coordinate~Coordinate} Coordinate.
* @return {import("../../coordinate.js").Coordinate} Coordinate.
*/
function(frac) {
return [lon, lat1 + ((lat2 - lat1) * frac)];
@@ -151,7 +151,7 @@ export function meridian(lon, lat1, lat2, projection, squaredTolerance) {
* @param {number} lat Latitude.
* @param {number} lon1 Longitude 1.
* @param {number} lon2 Longitude 2.
* @param {module:ol/proj/Projection} projection Projection.
* @param {import("../../proj/Projection.js").default} projection Projection.
* @param {number} squaredTolerance Squared tolerance.
* @return {Array<number>} Flat coordinates.
*/
@@ -160,7 +160,7 @@ export function parallel(lat, lon1, lon2, projection, squaredTolerance) {
return line(
/**
* @param {number} frac Fraction.
* @return {module:ol/coordinate~Coordinate} Coordinate.
* @return {import("../../coordinate.js").Coordinate} Coordinate.
*/
function(frac) {
return [lon1 + ((lon2 - lon1) * frac), lat];
+6 -6
View File
@@ -8,8 +8,8 @@
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {Array<module:ol/coordinate~Coordinate>=} opt_coordinates Coordinates.
* @return {Array<module:ol/coordinate~Coordinate>} Coordinates.
* @param {Array<import("../../coordinate.js").Coordinate>=} opt_coordinates Coordinates.
* @return {Array<import("../../coordinate.js").Coordinate>} Coordinates.
*/
export function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coordinates) {
const coordinates = opt_coordinates !== undefined ? opt_coordinates : [];
@@ -27,8 +27,8 @@ export function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coo
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {Array<Array<module:ol/coordinate~Coordinate>>=} opt_coordinatess Coordinatess.
* @return {Array<Array<module:ol/coordinate~Coordinate>>} Coordinatess.
* @param {Array<Array<import("../../coordinate.js").Coordinate>>=} opt_coordinatess Coordinatess.
* @return {Array<Array<import("../../coordinate.js").Coordinate>>} Coordinatess.
*/
export function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, opt_coordinatess) {
const coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];
@@ -49,9 +49,9 @@ export function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, o
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @param {Array<Array<Array<module:ol/coordinate~Coordinate>>>=} opt_coordinatesss
* @param {Array<Array<Array<import("../../coordinate.js").Coordinate>>>=} opt_coordinatesss
* Coordinatesss.
* @return {Array<Array<Array<module:ol/coordinate~Coordinate>>>} Coordinatesss.
* @return {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} Coordinatesss.
*/
export function inflateMultiCoordinatesArray(flatCoordinates, offset, endss, stride, opt_coordinatesss) {
const coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];
+2 -2
View File
@@ -71,7 +71,7 @@ export function interpolatePoint(flatCoordinates, offset, end, stride, fraction,
* @param {number} stride Stride.
* @param {number} m M.
* @param {boolean} extrapolate Extrapolate.
* @return {module:ol/coordinate~Coordinate} Coordinate.
* @return {import("../../coordinate.js").Coordinate} Coordinate.
*/
export function lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m, extrapolate) {
if (end == offset) {
@@ -133,7 +133,7 @@ export function lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m,
* @param {number} m M.
* @param {boolean} extrapolate Extrapolate.
* @param {boolean} interpolate Interpolate.
* @return {module:ol/coordinate~Coordinate} Coordinate.
* @return {import("../../coordinate.js").Coordinate} Coordinate.
*/
export function lineStringsCoordinateAtM(
flatCoordinates, offset, ends, stride, m, extrapolate, interpolate) {
+7 -7
View File
@@ -11,7 +11,7 @@ import {forEach as forEachSegment} from '../flat/segments.js';
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {module:ol/extent~Extent} extent Extent.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLineString(flatCoordinates, offset, end, stride, extent) {
@@ -33,8 +33,8 @@ export function intersectsLineString(flatCoordinates, offset, end, stride, exten
}
return forEachSegment(flatCoordinates, offset, end, stride,
/**
* @param {module:ol/coordinate~Coordinate} point1 Start point.
* @param {module:ol/coordinate~Coordinate} point2 End point.
* @param {import("../../coordinate.js").Coordinate} point1 Start point.
* @param {import("../../coordinate.js").Coordinate} point2 End point.
* @return {boolean} `true` if the segment and the extent intersect,
* `false` otherwise.
*/
@@ -49,7 +49,7 @@ export function intersectsLineString(flatCoordinates, offset, end, stride, exten
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {module:ol/extent~Extent} extent Extent.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLineStringArray(flatCoordinates, offset, ends, stride, extent) {
@@ -69,7 +69,7 @@ export function intersectsLineStringArray(flatCoordinates, offset, ends, stride,
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {module:ol/extent~Extent} extent Extent.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLinearRing(flatCoordinates, offset, end, stride, extent) {
@@ -98,7 +98,7 @@ export function intersectsLinearRing(flatCoordinates, offset, end, stride, exten
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {module:ol/extent~Extent} extent Extent.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent) {
@@ -123,7 +123,7 @@ export function intersectsLinearRingArray(flatCoordinates, offset, ends, stride,
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @param {module:ol/extent~Extent} extent Extent.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLinearRingMultiArray(flatCoordinates, offset, endss, stride, extent) {
+1 -1
View File
@@ -11,7 +11,7 @@
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {function(this: S, module:ol/coordinate~Coordinate, module:ol/coordinate~Coordinate): T} callback Function
* @param {function(this: S, import("../../coordinate.js").Coordinate, import("../../coordinate.js").Coordinate): T} callback Function
* called for each segment.
* @param {S=} opt_this The object to be used as the value of 'this'
* within callback.
+1 -1
View File
@@ -8,7 +8,7 @@
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {module:ol/transform~Transform} transform Transform.
* @param {import("../../transform.js").Transform} transform Transform.
* @param {Array<number>=} opt_dest Destination.
* @return {Array<number>} Transformed coordinates.
*/