From 76769f990131135e4f8f2a77b1f0b64410f2f83f Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 25 Apr 2018 13:48:31 +0200 Subject: [PATCH] Module type for ol.struct.* --- src/ol/render/canvas.js | 2 +- src/ol/render/webgl/PolygonReplay.js | 50 ++++++++++++++-------------- src/ol/renderer/webgl/Map.js | 6 ++-- src/ol/source/Vector.js | 4 +-- src/ol/structs/LRUCache.js | 2 +- src/ol/structs/LinkedList.js | 2 +- src/ol/structs/RBush.js | 2 +- 7 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/ol/render/canvas.js b/src/ol/render/canvas.js index ef8c6a2983..ddfe1105b3 100644 --- a/src/ol/render/canvas.js +++ b/src/ol/render/canvas.js @@ -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.} + * @type {module:ol/structs/LRUCache.} * @api */ export const labelCache = new LRUCache(); diff --git a/src/ol/render/webgl/PolygonReplay.js b/src/ol/render/webgl/PolygonReplay.js index f03e2673fa..e684c05fc5 100644 --- a/src/ol/render/webgl/PolygonReplay.js +++ b/src/ol/render/webgl/PolygonReplay.js @@ -150,8 +150,8 @@ WebGLPolygonReplay.prototype.drawCoordinates_ = function( * @private * @param {Array.} 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.} 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.} 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.} Intersecting segments. */ diff --git a/src/ol/renderer/webgl/Map.js b/src/ol/renderer/webgl/Map.js index 61c90a323b..c352e8aaa3 100644 --- a/src/ol/renderer/webgl/Map.js +++ b/src/ol/renderer/webgl/Map.js @@ -110,7 +110,7 @@ const WebGLMapRenderer = function(map) { /** * @private - * @type {ol.structs.LRUCache.} + * @type {module:ol/structs/LRUCache.} */ this.textureCache_ = new LRUCache(); @@ -122,7 +122,7 @@ const WebGLMapRenderer = function(map) { /** * @private - * @type {ol.structs.PriorityQueue.} + * @type {module:ol/structs/PriorityQueue.} */ this.tileTextureQueue_ = new PriorityQueue( /** @@ -339,7 +339,7 @@ WebGLMapRenderer.prototype.getGL = function() { /** - * @return {ol.structs.PriorityQueue.} Tile texture queue. + * @return {module:ol/structs/PriorityQueue.} Tile texture queue. */ WebGLMapRenderer.prototype.getTileTextureQueue = function() { return this.tileTextureQueue_; diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js index 6630d69832..0f93342361 100644 --- a/src/ol/source/Vector.js +++ b/src/ol/source/Vector.js @@ -209,13 +209,13 @@ const VectorSource = function(opt_options) { /** * @private - * @type {ol.structs.RBush.} + * @type {module:ol/structs/RBush.} */ 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(); diff --git a/src/ol/structs/LRUCache.js b/src/ol/structs/LRUCache.js index 8ab9d71028..c242e1e775 100644 --- a/src/ol/structs/LRUCache.js +++ b/src/ol/structs/LRUCache.js @@ -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. diff --git a/src/ol/structs/LinkedList.js b/src/ol/structs/LinkedList.js index e67e2d9a1a..3dd630bbed 100644 --- a/src/ol/structs/LinkedList.js +++ b/src/ol/structs/LinkedList.js @@ -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_) { diff --git a/src/ol/structs/RBush.js b/src/ol/structs/RBush.js index 038435d4e4..ae57c7b486 100644 --- a/src/ol/structs/RBush.js +++ b/src/ol/structs/RBush.js @@ -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());