diff --git a/src/ol/render/webgl/circlereplay/index.js b/src/ol/render/webgl/circlereplay/index.js index 5ab2677c5d..e947dc1505 100644 --- a/src/ol/render/webgl/circlereplay/index.js +++ b/src/ol/render/webgl/circlereplay/index.js @@ -164,7 +164,7 @@ ol.render.webgl.CircleReplay.prototype.finish = function(context) { */ ol.render.webgl.CircleReplay.prototype.getDeleteResourcesFunction = function(context) { // We only delete our stuff here. The shaders and the program may - // be used by other PolygonReplay instances (for other layers). And + // be used by other CircleReplay instances (for other layers). And // they will be deleted when disposing of the ol.webgl.Context // object. ol.DEBUG && console.assert(this.verticesBuffer, diff --git a/src/ol/render/webgl/index.js b/src/ol/render/webgl/index.js index 564bdad94a..8dc0eb2973 100644 --- a/src/ol/render/webgl/index.js +++ b/src/ol/render/webgl/index.js @@ -61,7 +61,7 @@ ol.render.webgl.lineStringInstruction = { }; /** - * Calcualtes the orientation of a triangle based on the determinant method. + * Calculates the orientation of a triangle based on the determinant method. * @param {number} x1 First X coordinate. * @param {number} y1 First Y coordinate. * @param {number} x2 Second X coordinate. diff --git a/src/ol/render/webgl/linestringreplay/index.js b/src/ol/render/webgl/linestringreplay/index.js index 911ca33955..a54280be12 100644 --- a/src/ol/render/webgl/linestringreplay/index.js +++ b/src/ol/render/webgl/linestringreplay/index.js @@ -150,6 +150,7 @@ ol.render.webgl.LineStringReplay.prototype.drawCoordinates_ = function(flatCoord break; } else { //For the compiler not to complain. This will never be [0, 0]. + ol.DEBUG && console.assert(p0, 'p0 should be defined'); p0 = p0 || [0, 0]; numVertices = this.addVertices_(p0, p1, [0, 0], @@ -189,6 +190,7 @@ ol.render.webgl.LineStringReplay.prototype.drawCoordinates_ = function(flatCoord p2 = [flatCoordinates[i + stride], flatCoordinates[i + stride + 1]]; } + // We group CW and straight lines, thus the not so inituitive CCW checking function. sign = ol.render.webgl.triangleIsCounterClockwise(p0[0], p0[1], p1[0], p1[1], p2[0], p2[1]) ? -1 : 1; @@ -232,6 +234,7 @@ ol.render.webgl.LineStringReplay.prototype.drawCoordinates_ = function(flatCoord if (closed) { //Link the last triangle/rhombus to the first one. //n will never be numVertices / 7 here. However, the compiler complains otherwise. + ol.DEBUG && console.assert(n, 'n should be defined'); n = n || numVertices / 7; sign = ol.geom.flat.orient.linearRingIsClockwise([p0[0], p0[1], p1[0], p1[1], p2[0], p2[1]], 0, 6, 2) ? 1 : -1; diff --git a/src/ol/render/webgl/polygonreplay/index.js b/src/ol/render/webgl/polygonreplay/index.js index 937d87ed9a..79d8042b7b 100644 --- a/src/ol/render/webgl/polygonreplay/index.js +++ b/src/ol/render/webgl/polygonreplay/index.js @@ -297,6 +297,7 @@ ol.render.webgl.PolygonReplay.prototype.triangulate_ = function(list, rtree) { // introduce touching segments. However, the original data may have some. if (!this.resolveLocalSelfIntersections_(list, rtree, true)) { // Something went wrong. + ol.DEBUG && console.assert(false, 'Unexpected simple polygon geometry'); break; } } diff --git a/src/ol/structs/linkedlist.js b/src/ol/structs/linkedlist.js index 7b51fde9fe..19fe515550 100644 --- a/src/ol/structs/linkedlist.js +++ b/src/ol/structs/linkedlist.js @@ -4,6 +4,7 @@ goog.provide('ol.structs.LinkedList'); * Creates an empty linked list structure. * * @constructor + * @struct * @param {boolean=} opt_circular The last item is connected to the first one, * and the first item to the last one. Default is true. */