diff --git a/src/ol/interaction/draw.js b/src/ol/interaction/draw.js index e42a6f5274..735d74482e 100644 --- a/src/ol/interaction/draw.js +++ b/src/ol/interaction/draw.js @@ -127,7 +127,7 @@ ol.interaction.Draw = function(options) { if (!geometryFunction) { if (this.type_ === ol.geom.GeometryType.CIRCLE) { /** - * @param {ol.Coordinate|Array.|Array.>} coordinates + * @param {!Array.} coordinates * The coordinates. * @param {ol.geom.SimpleGeometry=} opt_geometry Optional geometry. * @return {ol.geom.SimpleGeometry} A geometry. @@ -151,7 +151,7 @@ ol.interaction.Draw = function(options) { Constructor = ol.geom.Polygon; } /** - * @param {ol.Coordinate|Array.|Array.>} coordinates + * @param {!Array.} coordinates * The coordinates. * @param {ol.geom.SimpleGeometry=} opt_geometry Optional geometry. * @return {ol.geom.SimpleGeometry} A geometry. @@ -529,9 +529,7 @@ ol.interaction.Draw.prototype.modifyDrawing_ = function(event) { } last[0] = coordinate[0]; last[1] = coordinate[1]; - this.geometryFunction_( - /** @type {!ol.Coordinate|!Array.|!Array.>} */ (this.sketchCoords_), - geometry); + this.geometryFunction_(/** @type {!Array.} */ (this.sketchCoords_), geometry); if (this.sketchPoint_) { var sketchPointGeom = /** @type {ol.geom.Point} */ (this.sketchPoint_.getGeometry()); sketchPointGeom.setCoordinates(coordinate); @@ -800,7 +798,7 @@ ol.interaction.Draw.createRegularPolygon = function(opt_sides, opt_angle) { ol.interaction.Draw.createBox = function() { return ( /** - * @param {ol.Coordinate|Array.|Array.>} coordinates + * @param {Array.} coordinates * @param {ol.geom.SimpleGeometry=} opt_geometry * @return {ol.geom.SimpleGeometry} */ diff --git a/src/ol/typedefs.js b/src/ol/typedefs.js index a0c7be7310..9d2be5fe1e 100644 --- a/src/ol/typedefs.js +++ b/src/ol/typedefs.js @@ -156,12 +156,11 @@ ol.DragBoxEndConditionType; /** - * Function that takes coordinates and an optional existing geometry as + * Function that takes an array of coordinates and an optional existing geometry as * arguments, and returns a geometry. The optional existing geometry is the * geometry that is returned when the function is called without a second * argument. - * @typedef {function(!(ol.Coordinate|Array.| - * Array.>), ol.geom.SimpleGeometry=): + * @typedef {function(!Array., ol.geom.SimpleGeometry=): * ol.geom.SimpleGeometry} */ ol.DrawGeometryFunctionType;