Module type for ol.struct.*

This commit is contained in:
Frederic Junod
2018-04-25 13:48:31 +02:00
parent b4588f7d47
commit 76769f9901
7 changed files with 34 additions and 34 deletions

View File

@@ -156,7 +156,7 @@ export const defaultLineWidth = 1;
/**
* The label cache for text rendering. To change the default cache size of 2048
* entries, use {@link ol.structs.LRUCache#setSize}.
* @type {ol.structs.LRUCache.<HTMLCanvasElement>}
* @type {module:ol/structs/LRUCache.<HTMLCanvasElement>}
* @api
*/
export const labelCache = new LRUCache();

View File

@@ -150,8 +150,8 @@ WebGLPolygonReplay.prototype.drawCoordinates_ = function(
* @private
* @param {Array.<number>} flatCoordinates Flat coordinates.
* @param {number} stride Stride.
* @param {ol.structs.LinkedList} list Linked list.
* @param {ol.structs.RBush} rtree R-Tree of the polygon.
* @param {module:ol/structs/LinkedList} list Linked list.
* @param {module:ol/structs/RBush} rtree R-Tree of the polygon.
* @param {boolean} clockwise Coordinate order should be clockwise.
*/
WebGLPolygonReplay.prototype.processFlatCoordinates_ = function(
@@ -203,7 +203,7 @@ WebGLPolygonReplay.prototype.processFlatCoordinates_ = function(
/**
* Returns the rightmost coordinates of a polygon on the X axis.
* @private
* @param {ol.structs.LinkedList} list Polygons ring.
* @param {module:ol/structs/LinkedList} list Polygons ring.
* @return {Array.<number>} Max X coordinates.
*/
WebGLPolygonReplay.prototype.getMaxCoords_ = function(list) {
@@ -225,8 +225,8 @@ WebGLPolygonReplay.prototype.getMaxCoords_ = function(list) {
/**
* Classifies the points of a polygon list as convex, reflex. Removes collinear vertices.
* @private
* @param {ol.structs.LinkedList} list Polygon ring.
* @param {ol.structs.RBush} rtree R-Tree of the polygon.
* @param {module:ol/structs/LinkedList} list Polygon ring.
* @param {module:ol/structs/RBush} rtree R-Tree of the polygon.
* @param {boolean} ccw The orientation of the polygon is counter-clockwise.
* @return {boolean} There were reclassified points.
*/
@@ -261,11 +261,11 @@ WebGLPolygonReplay.prototype.classifyPoints_ = function(list, rtree, ccw) {
/**
* @private
* @param {ol.structs.LinkedList} hole Linked list of the hole.
* @param {module:ol/structs/LinkedList} hole Linked list of the hole.
* @param {number} holeMaxX Maximum X value of the hole.
* @param {ol.structs.LinkedList} list Linked list of the polygon.
* @param {module:ol/structs/LinkedList} list Linked list of the polygon.
* @param {number} listMaxX Maximum X value of the polygon.
* @param {ol.structs.RBush} rtree R-Tree of the polygon.
* @param {module:ol/structs/RBush} rtree R-Tree of the polygon.
* @return {boolean} Bridging was successful.
*/
WebGLPolygonReplay.prototype.bridgeHole_ = function(hole, holeMaxX,
@@ -338,8 +338,8 @@ WebGLPolygonReplay.prototype.bridgeHole_ = function(hole, holeMaxX,
/**
* @private
* @param {ol.structs.LinkedList} list Linked list of the polygon.
* @param {ol.structs.RBush} rtree R-Tree of the polygon.
* @param {module:ol/structs/LinkedList} list Linked list of the polygon.
* @param {module:ol/structs/RBush} rtree R-Tree of the polygon.
*/
WebGLPolygonReplay.prototype.triangulate_ = function(list, rtree) {
let ccw = false;
@@ -388,8 +388,8 @@ WebGLPolygonReplay.prototype.triangulate_ = function(list, rtree) {
/**
* @private
* @param {ol.structs.LinkedList} list Linked list of the polygon.
* @param {ol.structs.RBush} rtree R-Tree of the polygon.
* @param {module:ol/structs/LinkedList} list Linked list of the polygon.
* @param {module:ol/structs/RBush} rtree R-Tree of the polygon.
* @param {boolean} simple The polygon is simple.
* @param {boolean} ccw Orientation of the polygon is counter-clockwise.
* @return {boolean} There were processed ears.
@@ -447,8 +447,8 @@ WebGLPolygonReplay.prototype.clipEars_ = function(list, rtree, simple, ccw) {
/**
* @private
* @param {ol.structs.LinkedList} list Linked list of the polygon.
* @param {ol.structs.RBush} rtree R-Tree of the polygon.
* @param {module:ol/structs/LinkedList} list Linked list of the polygon.
* @param {module:ol/structs/RBush} rtree R-Tree of the polygon.
* @param {boolean=} opt_touch Resolve touching segments.
* @return {boolean} There were resolved intersections.
*/
@@ -516,8 +516,8 @@ WebGLPolygonReplay.prototype.resolveSelfIntersections_ = function(
/**
* @private
* @param {ol.structs.LinkedList} list Linked list of the polygon.
* @param {ol.structs.RBush} rtree R-Tree of the polygon.
* @param {module:ol/structs/LinkedList} list Linked list of the polygon.
* @param {module:ol/structs/RBush} rtree R-Tree of the polygon.
* @return {boolean} The polygon is simple.
*/
WebGLPolygonReplay.prototype.isSimple_ = function(list, rtree) {
@@ -535,7 +535,7 @@ WebGLPolygonReplay.prototype.isSimple_ = function(list, rtree) {
/**
* @private
* @param {ol.structs.LinkedList} list Linked list of the polygon.
* @param {module:ol/structs/LinkedList} list Linked list of the polygon.
* @return {boolean} Orientation is clockwise.
*/
WebGLPolygonReplay.prototype.isClockwise_ = function(list) {
@@ -555,8 +555,8 @@ WebGLPolygonReplay.prototype.isClockwise_ = function(list) {
/**
* @private
* @param {ol.structs.LinkedList} list Linked list of the polygon.
* @param {ol.structs.RBush} rtree R-Tree of the polygon.
* @param {module:ol/structs/LinkedList} list Linked list of the polygon.
* @param {module:ol/structs/RBush} rtree R-Tree of the polygon.
*/
WebGLPolygonReplay.prototype.splitPolygon_ = function(list, rtree) {
const start = list.firstItem();
@@ -623,8 +623,8 @@ WebGLPolygonReplay.prototype.createPoint_ = function(x, y, i) {
* @private
* @param {module:ol/render/webgl/PolygonReplay~PolygonVertex} p0 First point of segment.
* @param {module:ol/render/webgl/PolygonReplay~PolygonVertex} p1 Second point of segment.
* @param {ol.structs.LinkedList} list Polygon ring.
* @param {ol.structs.RBush=} opt_rtree Insert the segment into the R-Tree.
* @param {module:ol/structs/LinkedList} list Polygon ring.
* @param {module:ol/structs/RBush=} opt_rtree Insert the segment into the R-Tree.
* @return {module:ol/render/webgl/PolygonReplay~PolygonSegment} segment.
*/
WebGLPolygonReplay.prototype.insertItem_ = function(p0, p1, list, opt_rtree) {
@@ -645,8 +645,8 @@ WebGLPolygonReplay.prototype.insertItem_ = function(p0, p1, list, opt_rtree) {
* @private
* @param {module:ol/render/webgl/PolygonReplay~PolygonSegment} s0 Segment before the remove candidate.
* @param {module:ol/render/webgl/PolygonReplay~PolygonSegment} s1 Remove candidate segment.
* @param {ol.structs.LinkedList} list Polygon ring.
* @param {ol.structs.RBush} rtree R-Tree of the polygon.
* @param {module:ol/structs/LinkedList} list Polygon ring.
* @param {module:ol/structs/RBush} rtree R-Tree of the polygon.
*/
WebGLPolygonReplay.prototype.removeItem_ = function(s0, s1, list, rtree) {
if (list.getCurrItem() === s1) {
@@ -664,7 +664,7 @@ WebGLPolygonReplay.prototype.removeItem_ = function(s0, s1, list, rtree) {
* @param {module:ol/render/webgl/PolygonReplay~PolygonVertex} p0 First point.
* @param {module:ol/render/webgl/PolygonReplay~PolygonVertex} p1 Second point.
* @param {module:ol/render/webgl/PolygonReplay~PolygonVertex} p2 Third point.
* @param {ol.structs.RBush} rtree R-Tree of the polygon.
* @param {module:ol/structs/RBush} rtree R-Tree of the polygon.
* @param {boolean=} opt_reflex Only include reflex points.
* @return {Array.<module:ol/render/webgl/PolygonReplay~PolygonVertex>} Points in the triangle.
*/
@@ -692,7 +692,7 @@ WebGLPolygonReplay.prototype.getPointsInTriangle_ = function(p0, p1, p2, rtree,
/**
* @private
* @param {module:ol/render/webgl/PolygonReplay~PolygonSegment} segment Segment.
* @param {ol.structs.RBush} rtree R-Tree of the polygon.
* @param {module:ol/structs/RBush} rtree R-Tree of the polygon.
* @param {boolean=} opt_touch Touching segments should be considered an intersection.
* @return {Array.<module:ol/render/webgl/PolygonReplay~PolygonSegment>} Intersecting segments.
*/

View File

@@ -110,7 +110,7 @@ const WebGLMapRenderer = function(map) {
/**
* @private
* @type {ol.structs.LRUCache.<module:ol/renderer/webgl/Map~TextureCacheEntry|null>}
* @type {module:ol/structs/LRUCache.<module:ol/renderer/webgl/Map~TextureCacheEntry|null>}
*/
this.textureCache_ = new LRUCache();
@@ -122,7 +122,7 @@ const WebGLMapRenderer = function(map) {
/**
* @private
* @type {ol.structs.PriorityQueue.<Array>}
* @type {module:ol/structs/PriorityQueue.<Array>}
*/
this.tileTextureQueue_ = new PriorityQueue(
/**
@@ -339,7 +339,7 @@ WebGLMapRenderer.prototype.getGL = function() {
/**
* @return {ol.structs.PriorityQueue.<Array>} Tile texture queue.
* @return {module:ol/structs/PriorityQueue.<Array>} Tile texture queue.
*/
WebGLMapRenderer.prototype.getTileTextureQueue = function() {
return this.tileTextureQueue_;

View File

@@ -209,13 +209,13 @@ const VectorSource = function(opt_options) {
/**
* @private
* @type {ol.structs.RBush.<module:ol/Feature>}
* @type {module:ol/structs/RBush.<module:ol/Feature>}
*/
this.featuresRtree_ = useSpatialIndex ? new RBush() : null;
/**
* @private
* @type {ol.structs.RBush.<{extent: module:ol/extent~Extent}>}
* @type {module:ol/structs/RBush.<{extent: module:ol/extent~Extent}>}
*/
this.loadedExtentsRtree_ = new RBush();

View File

@@ -95,7 +95,7 @@ LRUCache.prototype.containsKey = function(key) {
/**
* @param {function(this: S, T, string, ol.structs.LRUCache): ?} f The function
* @param {function(this: S, T, string, module:ol/structs/LRUCache): ?} f The function
* to call for every entry from the oldest to the newer. This function takes
* 3 arguments (the entry value, the entry key and the LRUCache object).
* The return value is ignored.

View File

@@ -225,7 +225,7 @@ LinkedList.prototype.setFirstItem = function() {
/**
* Concatenates two lists.
* @param {ol.structs.LinkedList} list List to merge into the current list.
* @param {module:ol/structs/LinkedList} list List to merge into the current list.
*/
LinkedList.prototype.concat = function(list) {
if (list.head_) {

View File

@@ -227,7 +227,7 @@ RBush.prototype.getExtent = function(opt_extent) {
/**
* @param {ol.structs.RBush} rbush R-Tree.
* @param {module:ol/structs/RBush} rbush R-Tree.
*/
RBush.prototype.concat = function(rbush) {
this.rbush_.load(rbush.rbush_.all());