Remove 'struct' jsdoc tags, code indentation

This commit is contained in:
Frederic Junod
2018-07-18 09:07:19 +02:00
parent b4e0d4c188
commit 65b306891b
26 changed files with 248 additions and 278 deletions

View File

@@ -9,7 +9,6 @@
* Base class for WFS GetFeature filters. * Base class for WFS GetFeature filters.
* *
* @abstract * @abstract
* @struct
*/ */
class Filter { class Filter {
/** /**
@@ -18,16 +17,16 @@ class Filter {
constructor(tagName) { constructor(tagName) {
/** /**
* @private * @private
* @type {!string} * @type {!string}
*/ */
this.tagName_ = tagName; this.tagName_ = tagName;
} }
/** /**
* The XML tag name for a filter. * The XML tag name for a filter.
* @returns {!string} Name. * @returns {!string} Name.
*/ */
getTagName() { getTagName() {
return this.tagName_; return this.tagName_;
} }

View File

@@ -5,110 +5,108 @@
/** /**
* Context for drawing geometries. A vector context is available on render * Context for drawing geometries. A vector context is available on render
* events and does not need to be constructed directly. * events and does not need to be constructed directly.
* @struct
* @api * @api
*/ */
class VectorContext { class VectorContext {
/** /**
* Render a geometry with a custom renderer. * Render a geometry with a custom renderer.
* *
* @param {module:ol/geom/SimpleGeometry} geometry Geometry. * @param {module:ol/geom/SimpleGeometry} geometry Geometry.
* @param {module:ol/Feature|module:ol/render/Feature} feature Feature. * @param {module:ol/Feature|module:ol/render/Feature} feature Feature.
* @param {Function} renderer Renderer. * @param {Function} renderer Renderer.
*/ */
drawCustom(geometry, feature, renderer) {} drawCustom(geometry, feature, renderer) {}
/** /**
* Render a geometry. * Render a geometry.
* *
* @param {module:ol/geom/Geometry} geometry The geometry to render. * @param {module:ol/geom/Geometry} geometry The geometry to render.
*/ */
drawGeometry(geometry) {} drawGeometry(geometry) {}
/** /**
* Set the rendering style. * Set the rendering style.
* *
* @param {module:ol/style/Style} style The rendering style. * @param {module:ol/style/Style} style The rendering style.
*/ */
setStyle(style) {} setStyle(style) {}
/** /**
* @param {module:ol/geom/Circle} circleGeometry Circle geometry. * @param {module:ol/geom/Circle} circleGeometry Circle geometry.
* @param {module:ol/Feature} feature Feature. * @param {module:ol/Feature} feature Feature.
*/ */
drawCircle(circleGeometry, feature) {} drawCircle(circleGeometry, feature) {}
/** /**
* @param {module:ol/Feature} feature Feature. * @param {module:ol/Feature} feature Feature.
* @param {module:ol/style/Style} style Style. * @param {module:ol/style/Style} style Style.
*/ */
drawFeature(feature, style) {} drawFeature(feature, style) {}
/** /**
* @param {module:ol/geom/GeometryCollection} geometryCollectionGeometry Geometry * @param {module:ol/geom/GeometryCollection} geometryCollectionGeometry Geometry collection.
* collection. * @param {module:ol/Feature} feature Feature.
* @param {module:ol/Feature} feature Feature. */
*/
drawGeometryCollection(geometryCollectionGeometry, feature) {} drawGeometryCollection(geometryCollectionGeometry, feature) {}
/** /**
* @param {module:ol/geom/LineString|module:ol/render/Feature} lineStringGeometry Line string geometry. * @param {module:ol/geom/LineString|module:ol/render/Feature} lineStringGeometry Line string geometry.
* @param {module:ol/Feature|module:ol/render/Feature} feature Feature. * @param {module:ol/Feature|module:ol/render/Feature} feature Feature.
*/ */
drawLineString(lineStringGeometry, feature) {} drawLineString(lineStringGeometry, feature) {}
/** /**
* @param {module:ol/geom/MultiLineString|module:ol/render/Feature} multiLineStringGeometry MultiLineString geometry. * @param {module:ol/geom/MultiLineString|module:ol/render/Feature} multiLineStringGeometry MultiLineString geometry.
* @param {module:ol/Feature|module:ol/render/Feature} feature Feature. * @param {module:ol/Feature|module:ol/render/Feature} feature Feature.
*/ */
drawMultiLineString(multiLineStringGeometry, feature) {} drawMultiLineString(multiLineStringGeometry, feature) {}
/** /**
* @param {module:ol/geom/MultiPoint|module:ol/render/Feature} multiPointGeometry MultiPoint geometry. * @param {module:ol/geom/MultiPoint|module:ol/render/Feature} multiPointGeometry MultiPoint geometry.
* @param {module:ol/Feature|module:ol/render/Feature} feature Feature. * @param {module:ol/Feature|module:ol/render/Feature} feature Feature.
*/ */
drawMultiPoint(multiPointGeometry, feature) {} drawMultiPoint(multiPointGeometry, feature) {}
/** /**
* @param {module:ol/geom/MultiPolygon} multiPolygonGeometry MultiPolygon geometry. * @param {module:ol/geom/MultiPolygon} multiPolygonGeometry MultiPolygon geometry.
* @param {module:ol/Feature|module:ol/render/Feature} feature Feature. * @param {module:ol/Feature|module:ol/render/Feature} feature Feature.
*/ */
drawMultiPolygon(multiPolygonGeometry, feature) {} drawMultiPolygon(multiPolygonGeometry, feature) {}
/** /**
* @param {module:ol/geom/Point|module:ol/render/Feature} pointGeometry Point geometry. * @param {module:ol/geom/Point|module:ol/render/Feature} pointGeometry Point geometry.
* @param {module:ol/Feature|module:ol/render/Feature} feature Feature. * @param {module:ol/Feature|module:ol/render/Feature} feature Feature.
*/ */
drawPoint(pointGeometry, feature) {} drawPoint(pointGeometry, feature) {}
/** /**
* @param {module:ol/geom/Polygon|module:ol/render/Feature} polygonGeometry Polygon geometry. * @param {module:ol/geom/Polygon|module:ol/render/Feature} polygonGeometry Polygon geometry.
* @param {module:ol/Feature|module:ol/render/Feature} feature Feature. * @param {module:ol/Feature|module:ol/render/Feature} feature Feature.
*/ */
drawPolygon(polygonGeometry, feature) {} drawPolygon(polygonGeometry, feature) {}
/** /**
* @param {module:ol/geom/Geometry|module:ol/render/Feature} geometry Geometry. * @param {module:ol/geom/Geometry|module:ol/render/Feature} geometry Geometry.
* @param {module:ol/Feature|module:ol/render/Feature} feature Feature. * @param {module:ol/Feature|module:ol/render/Feature} feature Feature.
*/ */
drawText(geometry, feature) {} drawText(geometry, feature) {}
/** /**
* @param {module:ol/style/Fill} fillStyle Fill style. * @param {module:ol/style/Fill} fillStyle Fill style.
* @param {module:ol/style/Stroke} strokeStyle Stroke style. * @param {module:ol/style/Stroke} strokeStyle Stroke style.
*/ */
setFillStrokeStyle(fillStyle, strokeStyle) {} setFillStrokeStyle(fillStyle, strokeStyle) {}
/** /**
* @param {module:ol/style/Image} imageStyle Image style. * @param {module:ol/style/Image} imageStyle Image style.
* @param {module:ol/render/canvas~DeclutterGroup=} opt_declutterGroup Declutter. * @param {module:ol/render/canvas~DeclutterGroup=} opt_declutterGroup Declutter.
*/ */
setImageStyle(imageStyle, opt_declutterGroup) {} setImageStyle(imageStyle, opt_declutterGroup) {}
/** /**
* @param {module:ol/style/Text} textStyle Text style. * @param {module:ol/style/Text} textStyle Text style.
* @param {module:ol/render/canvas~DeclutterGroup=} opt_declutterGroup Declutter. * @param {module:ol/render/canvas~DeclutterGroup=} opt_declutterGroup Declutter.
*/ */
setTextStyle(textStyle, opt_declutterGroup) {} setTextStyle(textStyle, opt_declutterGroup) {}
} }

View File

@@ -12,112 +12,111 @@ class CanvasImageReplay extends CanvasReplay {
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay can have overlapping geometries. * @param {boolean} overlaps The replay can have overlapping geometries.
* @param {?} declutterTree Declutter tree. * @param {?} declutterTree Declutter tree.
* @struct
*/ */
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) { constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree); super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
/** /**
* @private * @private
* @type {module:ol/render/canvas~DeclutterGroup} * @type {module:ol/render/canvas~DeclutterGroup}
*/ */
this.declutterGroup_ = null; this.declutterGroup_ = null;
/** /**
* @private * @private
* @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}
*/ */
this.hitDetectionImage_ = null; this.hitDetectionImage_ = null;
/** /**
* @private * @private
* @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}
*/ */
this.image_ = null; this.image_ = null;
/** /**
* @private * @private
* @type {number|undefined} * @type {number|undefined}
*/ */
this.anchorX_ = undefined; this.anchorX_ = undefined;
/** /**
* @private * @private
* @type {number|undefined} * @type {number|undefined}
*/ */
this.anchorY_ = undefined; this.anchorY_ = undefined;
/** /**
* @private * @private
* @type {number|undefined} * @type {number|undefined}
*/ */
this.height_ = undefined; this.height_ = undefined;
/** /**
* @private * @private
* @type {number|undefined} * @type {number|undefined}
*/ */
this.opacity_ = undefined; this.opacity_ = undefined;
/** /**
* @private * @private
* @type {number|undefined} * @type {number|undefined}
*/ */
this.originX_ = undefined; this.originX_ = undefined;
/** /**
* @private * @private
* @type {number|undefined} * @type {number|undefined}
*/ */
this.originY_ = undefined; this.originY_ = undefined;
/** /**
* @private * @private
* @type {boolean|undefined} * @type {boolean|undefined}
*/ */
this.rotateWithView_ = undefined; this.rotateWithView_ = undefined;
/** /**
* @private * @private
* @type {number|undefined} * @type {number|undefined}
*/ */
this.rotation_ = undefined; this.rotation_ = undefined;
/** /**
* @private * @private
* @type {number|undefined} * @type {number|undefined}
*/ */
this.scale_ = undefined; this.scale_ = undefined;
/** /**
* @private * @private
* @type {boolean|undefined} * @type {boolean|undefined}
*/ */
this.snapToPixel_ = undefined; this.snapToPixel_ = undefined;
/** /**
* @private * @private
* @type {number|undefined} * @type {number|undefined}
*/ */
this.width_ = undefined; this.width_ = undefined;
} }
/** /**
* @param {Array.<number>} flatCoordinates Flat coordinates. * @param {Array.<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset. * @param {number} offset Offset.
* @param {number} end End. * @param {number} end End.
* @param {number} stride Stride. * @param {number} stride Stride.
* @private * @private
* @return {number} My end. * @return {number} My end.
*/ */
drawCoordinates_(flatCoordinates, offset, end, stride) { drawCoordinates_(flatCoordinates, offset, end, stride) {
return this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false); return this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false);
} }
/** /**
* @inheritDoc * @inheritDoc
*/ */
drawPoint(pointGeometry, feature) { drawPoint(pointGeometry, feature) {
if (!this.image_) { if (!this.image_) {
return; return;
@@ -145,8 +144,8 @@ class CanvasImageReplay extends CanvasReplay {
} }
/** /**
* @inheritDoc * @inheritDoc
*/ */
drawMultiPoint(multiPointGeometry, feature) { drawMultiPoint(multiPointGeometry, feature) {
if (!this.image_) { if (!this.image_) {
return; return;
@@ -175,8 +174,8 @@ class CanvasImageReplay extends CanvasReplay {
} }
/** /**
* @inheritDoc * @inheritDoc
*/ */
finish() { finish() {
this.reverseHitDetectionInstructions(); this.reverseHitDetectionInstructions();
// FIXME this doesn't really protect us against further calls to draw*Geometry // FIXME this doesn't really protect us against further calls to draw*Geometry
@@ -196,8 +195,8 @@ class CanvasImageReplay extends CanvasReplay {
} }
/** /**
* @inheritDoc * @inheritDoc
*/ */
setImageStyle(imageStyle, declutterGroup) { setImageStyle(imageStyle, declutterGroup) {
const anchor = imageStyle.getAnchor(); const anchor = imageStyle.getAnchor();
const size = imageStyle.getSize(); const size = imageStyle.getSize();

View File

@@ -31,7 +31,6 @@ class CanvasImmediateRenderer extends VectorContext {
* @param {module:ol/extent~Extent} extent Extent. * @param {module:ol/extent~Extent} extent Extent.
* @param {module:ol/transform~Transform} transform Transform. * @param {module:ol/transform~Transform} transform Transform.
* @param {number} viewRotation View rotation. * @param {number} viewRotation View rotation.
* @struct
*/ */
constructor(context, pixelRatio, extent, transform, viewRotation) { constructor(context, pixelRatio, extent, transform, viewRotation) {
super(); super();

View File

@@ -12,7 +12,6 @@ class CanvasLineStringReplay extends CanvasReplay {
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay can have overlapping geometries. * @param {boolean} overlaps The replay can have overlapping geometries.
* @param {?} declutterTree Declutter tree. * @param {?} declutterTree Declutter tree.
* @struct
*/ */
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) { constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree); super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);

View File

@@ -18,7 +18,6 @@ class CanvasPolygonReplay extends CanvasReplay {
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay can have overlapping geometries. * @param {boolean} overlaps The replay can have overlapping geometries.
* @param {?} declutterTree Declutter tree. * @param {?} declutterTree Declutter tree.
* @struct
*/ */
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) { constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree); super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);

View File

@@ -49,7 +49,6 @@ class CanvasReplay extends VectorContext {
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay can have overlapping geometries. * @param {boolean} overlaps The replay can have overlapping geometries.
* @param {?} declutterTree Declutter tree. * @param {?} declutterTree Declutter tree.
* @struct
*/ */
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) { constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
super(); super();

View File

@@ -40,10 +40,8 @@ class CanvasReplayGroup extends ReplayGroup {
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay group can have overlapping geometries. * @param {boolean} overlaps The replay group can have overlapping geometries.
* @param {?} declutterTree Declutter tree * @param {?} declutterTree Declutter tree for declutter processing in postrender.
* for declutter processing in postrender.
* @param {number=} opt_renderBuffer Optional rendering buffer. * @param {number=} opt_renderBuffer Optional rendering buffer.
* @struct
*/ */
constructor( constructor(
tolerance, tolerance,

View File

@@ -22,7 +22,6 @@ class CanvasTextReplay extends CanvasReplay {
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay can have overlapping geometries. * @param {boolean} overlaps The replay can have overlapping geometries.
* @param {?} declutterTree Declutter tree. * @param {?} declutterTree Declutter tree.
* @struct
*/ */
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) { constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree); super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);

View File

@@ -19,7 +19,6 @@ class WebGLCircleReplay extends WebGLReplay {
/** /**
* @param {number} tolerance Tolerance. * @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent. * @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/ */
constructor(tolerance, maxExtent) { constructor(tolerance, maxExtent) {
super(tolerance, maxExtent); super(tolerance, maxExtent);

View File

@@ -9,7 +9,6 @@ class WebGLImageReplay extends WebGLTextureReplay {
/** /**
* @param {number} tolerance Tolerance. * @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent. * @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/ */
constructor(tolerance, maxExtent) { constructor(tolerance, maxExtent) {
super(tolerance, maxExtent); super(tolerance, maxExtent);

View File

@@ -17,7 +17,6 @@ class WebGLImmediateRenderer extends VectorContext {
* @param {module:ol/size~Size} size Size. * @param {module:ol/size~Size} size Size.
* @param {module:ol/extent~Extent} extent Extent. * @param {module:ol/extent~Extent} extent Extent.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @struct
*/ */
constructor(context, center, resolution, rotation, size, extent, pixelRatio) { constructor(context, center, resolution, rotation, size, extent, pixelRatio) {
super(); super();

View File

@@ -39,7 +39,6 @@ class WebGLLineStringReplay extends WebGLReplay {
/** /**
* @param {number} tolerance Tolerance. * @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent. * @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/ */
constructor(tolerance, maxExtent) { constructor(tolerance, maxExtent) {
super(tolerance, maxExtent); super(tolerance, maxExtent);

View File

@@ -40,7 +40,6 @@ class WebGLPolygonReplay extends WebGLReplay {
/** /**
* @param {number} tolerance Tolerance. * @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent. * @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/ */
constructor(tolerance, maxExtent) { constructor(tolerance, maxExtent) {
super(tolerance, maxExtent); super(tolerance, maxExtent);

View File

@@ -19,178 +19,176 @@ class WebGLReplay extends VectorContext {
/** /**
* @param {number} tolerance Tolerance. * @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent. * @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/ */
constructor(tolerance, maxExtent) { constructor(tolerance, maxExtent) {
super(); super();
/** /**
* @protected * @protected
* @type {number} * @type {number}
*/ */
this.tolerance = tolerance; this.tolerance = tolerance;
/** /**
* @protected * @protected
* @const * @const
* @type {module:ol/extent~Extent} * @type {module:ol/extent~Extent}
*/ */
this.maxExtent = maxExtent; this.maxExtent = maxExtent;
/** /**
* The origin of the coordinate system for the point coordinates sent to * The origin of the coordinate system for the point coordinates sent to
* the GPU. To eliminate jitter caused by precision problems in the GPU * the GPU. To eliminate jitter caused by precision problems in the GPU
* we use the "Rendering Relative to Eye" technique described in the "3D * we use the "Rendering Relative to Eye" technique described in the "3D
* Engine Design for Virtual Globes" book. * Engine Design for Virtual Globes" book.
* @protected * @protected
* @type {module:ol/coordinate~Coordinate} * @type {module:ol/coordinate~Coordinate}
*/ */
this.origin = getCenter(maxExtent); this.origin = getCenter(maxExtent);
/** /**
* @private * @private
* @type {module:ol/transform~Transform} * @type {module:ol/transform~Transform}
*/ */
this.projectionMatrix_ = createTransform(); this.projectionMatrix_ = createTransform();
/** /**
* @private * @private
* @type {module:ol/transform~Transform} * @type {module:ol/transform~Transform}
*/ */
this.offsetRotateMatrix_ = createTransform(); this.offsetRotateMatrix_ = createTransform();
/** /**
* @private * @private
* @type {module:ol/transform~Transform} * @type {module:ol/transform~Transform}
*/ */
this.offsetScaleMatrix_ = createTransform(); this.offsetScaleMatrix_ = createTransform();
/** /**
* @private * @private
* @type {Array.<number>} * @type {Array.<number>}
*/ */
this.tmpMat4_ = create(); this.tmpMat4_ = create();
/** /**
* @protected * @protected
* @type {Array.<number>} * @type {Array.<number>}
*/ */
this.indices = []; this.indices = [];
/** /**
* @protected * @protected
* @type {?module:ol/webgl/Buffer} * @type {?module:ol/webgl/Buffer}
*/ */
this.indicesBuffer = null; this.indicesBuffer = null;
/** /**
* Start index per feature (the index). * Start index per feature (the index).
* @protected * @protected
* @type {Array.<number>} * @type {Array.<number>}
*/ */
this.startIndices = []; this.startIndices = [];
/** /**
* Start index per feature (the feature). * Start index per feature (the feature).
* @protected * @protected
* @type {Array.<module:ol/Feature|module:ol/render/Feature>} * @type {Array.<module:ol/Feature|module:ol/render/Feature>}
*/ */
this.startIndicesFeature = []; this.startIndicesFeature = [];
/** /**
* @protected * @protected
* @type {Array.<number>} * @type {Array.<number>}
*/ */
this.vertices = []; this.vertices = [];
/** /**
* @protected * @protected
* @type {?module:ol/webgl/Buffer} * @type {?module:ol/webgl/Buffer}
*/ */
this.verticesBuffer = null; this.verticesBuffer = null;
/** /**
* Optional parameter for PolygonReplay instances. * Optional parameter for PolygonReplay instances.
* @protected * @protected
* @type {module:ol/render/webgl/LineStringReplay|undefined} * @type {module:ol/render/webgl/LineStringReplay|undefined}
*/ */
this.lineStringReplay = undefined; this.lineStringReplay = undefined;
} }
/** /**
* @abstract * @abstract
* @param {module:ol/webgl/Context} context WebGL context. * @param {module:ol/webgl/Context} context WebGL context.
* @return {function()} Delete resources function. * @return {function()} Delete resources function.
*/ */
getDeleteResourcesFunction(context) {} getDeleteResourcesFunction(context) {}
/** /**
* @abstract * @abstract
* @param {module:ol/webgl/Context} context Context. * @param {module:ol/webgl/Context} context Context.
*/ */
finish(context) {} finish(context) {}
/** /**
* @abstract * @abstract
* @protected * @protected
* @param {WebGLRenderingContext} gl gl. * @param {WebGLRenderingContext} gl gl.
* @param {module:ol/webgl/Context} context Context. * @param {module:ol/webgl/Context} context Context.
* @param {module:ol/size~Size} size Size. * @param {module:ol/size~Size} size Size.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @return {module:ol/render/webgl/circlereplay/defaultshader/Locations| * @return {module:ol/render/webgl/circlereplay/defaultshader/Locations|
module:ol/render/webgl/linestringreplay/defaultshader/Locations| module:ol/render/webgl/linestringreplay/defaultshader/Locations|
module:ol/render/webgl/polygonreplay/defaultshader/Locations| module:ol/render/webgl/polygonreplay/defaultshader/Locations|
module:ol/render/webgl/texturereplay/defaultshader/Locations} Locations. module:ol/render/webgl/texturereplay/defaultshader/Locations} Locations.
*/ */
setUpProgram(gl, context, size, pixelRatio) {} setUpProgram(gl, context, size, pixelRatio) {}
/** /**
* @abstract * @abstract
* @protected * @protected
* @param {WebGLRenderingContext} gl gl. * @param {WebGLRenderingContext} gl gl.
* @param {module:ol/render/webgl/circlereplay/defaultshader/Locations| * @param {module:ol/render/webgl/circlereplay/defaultshader/Locations|
module:ol/render/webgl/linestringreplay/defaultshader/Locations| module:ol/render/webgl/linestringreplay/defaultshader/Locations|
module:ol/render/webgl/polygonreplay/defaultshader/Locations| module:ol/render/webgl/polygonreplay/defaultshader/Locations|
module:ol/render/webgl/texturereplay/defaultshader/Locations} locations Locations. module:ol/render/webgl/texturereplay/defaultshader/Locations} locations Locations.
*/ */
shutDownProgram(gl, locations) {} shutDownProgram(gl, locations) {}
/** /**
* @abstract * @abstract
* @protected * @protected
* @param {WebGLRenderingContext} gl gl. * @param {WebGLRenderingContext} gl gl.
* @param {module:ol/webgl/Context} context Context. * @param {module:ol/webgl/Context} context Context.
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip. * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
* @param {boolean} hitDetection Hit detection mode. * @param {boolean} hitDetection Hit detection mode.
*/ */
drawReplay(gl, context, skippedFeaturesHash, hitDetection) {} drawReplay(gl, context, skippedFeaturesHash, hitDetection) {}
/** /**
* @abstract * @abstract
* @protected * @protected
* @param {WebGLRenderingContext} gl gl. * @param {WebGLRenderingContext} gl gl.
* @param {module:ol/webgl/Context} context Context. * @param {module:ol/webgl/Context} context Context.
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip. * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
* @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} featureCallback Feature callback. * @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} featureCallback Feature callback.
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting this extent are checked. * @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting this extent are checked.
* @return {T|undefined} Callback result. * @return {T|undefined} Callback result.
* @template T * @template T
*/ */
drawHitDetectionReplayOneByOne(gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {} drawHitDetectionReplayOneByOne(gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {}
/** /**
* @protected * @protected
* @param {WebGLRenderingContext} gl gl. * @param {WebGLRenderingContext} gl gl.
* @param {module:ol/webgl/Context} context Context. * @param {module:ol/webgl/Context} context Context.
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip. * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
* @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} featureCallback Feature callback. * @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} featureCallback Feature callback.
* @param {boolean} oneByOne Draw features one-by-one for the hit-detecion. * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting * @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting this extent are checked.
* this extent are checked. * @return {T|undefined} Callback result.
* @return {T|undefined} Callback result. * @template T
* @template T */
*/
drawHitDetectionReplay(gl, context, skippedFeaturesHash, featureCallback, oneByOne, opt_hitExtent) { drawHitDetectionReplay(gl, context, skippedFeaturesHash, featureCallback, oneByOne, opt_hitExtent) {
if (!oneByOne) { if (!oneByOne) {
// draw all hit-detection features in "once" (by texture group) // draw all hit-detection features in "once" (by texture group)
@@ -204,14 +202,14 @@ class WebGLReplay extends VectorContext {
} }
/** /**
* @protected * @protected
* @param {WebGLRenderingContext} gl gl. * @param {WebGLRenderingContext} gl gl.
* @param {module:ol/webgl/Context} context Context. * @param {module:ol/webgl/Context} context Context.
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip. * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
* @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} featureCallback Feature callback. * @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} featureCallback Feature callback.
* @return {T|undefined} Callback result. * @return {T|undefined} Callback result.
* @template T * @template T
*/ */
drawHitDetectionReplayAll(gl, context, skippedFeaturesHash, featureCallback) { drawHitDetectionReplayAll(gl, context, skippedFeaturesHash, featureCallback) {
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
this.drawReplay(gl, context, skippedFeaturesHash, true); this.drawReplay(gl, context, skippedFeaturesHash, true);
@@ -225,21 +223,20 @@ class WebGLReplay extends VectorContext {
} }
/** /**
* @param {module:ol/webgl/Context} context Context. * @param {module:ol/webgl/Context} context Context.
* @param {module:ol/coordinate~Coordinate} center Center. * @param {module:ol/coordinate~Coordinate} center Center.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @param {number} rotation Rotation. * @param {number} rotation Rotation.
* @param {module:ol/size~Size} size Size. * @param {module:ol/size~Size} size Size.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {number} opacity Global opacity. * @param {number} opacity Global opacity.
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip. * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
* @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} featureCallback Feature callback. * @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} featureCallback Feature callback.
* @param {boolean} oneByOne Draw features one-by-one for the hit-detecion. * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting * @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting this extent are checked.
* this extent are checked. * @return {T|undefined} Callback result.
* @return {T|undefined} Callback result. * @template T
* @template T */
*/
replay( replay(
context, context,
center, center,
@@ -339,12 +336,12 @@ class WebGLReplay extends VectorContext {
} }
/** /**
* @protected * @protected
* @param {WebGLRenderingContext} gl gl. * @param {WebGLRenderingContext} gl gl.
* @param {module:ol/webgl/Context} context Context. * @param {module:ol/webgl/Context} context Context.
* @param {number} start Start index. * @param {number} start Start index.
* @param {number} end End index. * @param {number} end End index.
*/ */
drawElements(gl, context, start, end) { drawElements(gl, context, start, end) {
const elementType = context.hasOESElementIndexUint ? const elementType = context.hasOESElementIndexUint ?
UNSIGNED_INT : UNSIGNED_SHORT; UNSIGNED_INT : UNSIGNED_SHORT;

View File

@@ -37,7 +37,6 @@ class WebGLReplayGroup extends ReplayGroup {
* @param {number} tolerance Tolerance. * @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent. * @param {module:ol/extent~Extent} maxExtent Max extent.
* @param {number=} opt_renderBuffer Render buffer. * @param {number=} opt_renderBuffer Render buffer.
* @struct
*/ */
constructor(tolerance, maxExtent, opt_renderBuffer) { constructor(tolerance, maxExtent, opt_renderBuffer) {
super(); super();

View File

@@ -26,7 +26,6 @@ class WebGLTextReplay extends WebGLTextureReplay {
/** /**
* @param {number} tolerance Tolerance. * @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent. * @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/ */
constructor(tolerance, maxExtent) { constructor(tolerance, maxExtent) {
super(tolerance, maxExtent); super(tolerance, maxExtent);

View File

@@ -14,7 +14,6 @@ class WebGLTextureReplay extends WebGLReplay {
/** /**
* @param {number} tolerance Tolerance. * @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent. * @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/ */
constructor(tolerance, maxExtent) { constructor(tolerance, maxExtent) {
super(tolerance, maxExtent); super(tolerance, maxExtent);

View File

@@ -14,7 +14,6 @@ class LayerRenderer extends Observable {
/** /**
* @param {module:ol/layer/Layer} layer Layer. * @param {module:ol/layer/Layer} layer Layer.
* @struct
*/ */
constructor(layer) { constructor(layer) {

View File

@@ -16,7 +16,6 @@ class MapRenderer extends Disposable {
/** /**
* @param {module:ol/PluggableMap} map Map. * @param {module:ol/PluggableMap} map Map.
* @struct
*/ */
constructor(map) { constructor(map) {
super(); super();

View File

@@ -24,7 +24,6 @@ class LRUCache extends EventTarget {
* items from the cache is the responsibility of the user. * items from the cache is the responsibility of the user.
* *
* @fires module:ol/events/Event~Event * @fires module:ol/events/Event~Event
* @struct
* @template T * @template T
* @param {number=} opt_highWaterMark High water mark. * @param {number=} opt_highWaterMark High water mark.
*/ */

View File

@@ -23,7 +23,6 @@ class PriorityQueue {
* *
* @param {function(T): number} priorityFunction Priority function. * @param {function(T): number} priorityFunction Priority function.
* @param {function(T): string} keyFunction Key function. * @param {function(T): string} keyFunction Key function.
* @struct
* @template T * @template T
*/ */
constructor(priorityFunction, keyFunction) { constructor(priorityFunction, keyFunction) {

View File

@@ -22,7 +22,6 @@ class RBush {
* *
* @param {number=} opt_maxEntries Max entries. * @param {number=} opt_maxEntries Max entries.
* @see https://github.com/mourner/rbush * @see https://github.com/mourner/rbush
* @struct
* @template T * @template T
*/ */
constructor(opt_maxEntries) { constructor(opt_maxEntries) {

View File

@@ -31,7 +31,6 @@ class Atlas {
* managed with the bin packing algorithm described in: * managed with the bin packing algorithm described in:
* http://www.blackpawn.com/texts/lightmaps/ * http://www.blackpawn.com/texts/lightmaps/
* *
* @struct
* @param {number} size The size in pixels of the sprite image. * @param {number} size The size in pixels of the sprite image.
* @param {number} space The space in pixels between images. * @param {number} space The space in pixels between images.
* Because texture coordinates are float values, the edges of * Because texture coordinates are float values, the edges of

View File

@@ -54,7 +54,6 @@ class AtlasManager {
* If an application uses many images or very large images, it is recommended * If an application uses many images or very large images, it is recommended
* to set a higher `size` value to avoid the creation of too many atlases. * to set a higher `size` value to avoid the creation of too many atlases.
* *
* @struct
* @api * @api
* @param {module:ol/style/AtlasManager~Options=} opt_options Options. * @param {module:ol/style/AtlasManager~Options=} opt_options Options.
*/ */

View File

@@ -51,7 +51,6 @@ class WMTSTileGrid extends TileGrid {
* Set the grid pattern for sources accessing WMTS tiled-image servers. * Set the grid pattern for sources accessing WMTS tiled-image servers.
* *
* @param {module:ol/tilegrid/WMTS~Options} options WMTS options. * @param {module:ol/tilegrid/WMTS~Options} options WMTS options.
* @struct
* @api * @api
*/ */
constructor(options) { constructor(options) {