Skip to content

Commit 855830f

Browse files
JS Doc cleanup
1 parent 6396538 commit 855830f

File tree

1 file changed

+66
-58
lines changed

1 file changed

+66
-58
lines changed

packages/geoview-core/src/geo/layer/gv-layers/vector/abstract-gv-vector.ts

Lines changed: 66 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
152152
/**
153153
* Overrides the parent class's getter to provide a more specific return type (covariant return).
154154
*
155-
* @returns {VectorLayerEntryConfig} The strongly-typed layer configuration specific to this layer.
155+
* @returns The strongly-typed layer configuration specific to this layer.
156156
*/
157157
override getLayerConfig(): VectorLayerEntryConfig {
158158
// Call parent and cast
@@ -161,6 +161,7 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
161161

162162
/**
163163
* Sets the visibility of the layer.
164+
*
164165
* @param layerVisibility - The visibility state to set.
165166
*/
166167
override setVisible(layerVisibility: boolean): void {
@@ -192,10 +193,9 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
192193

193194
/**
194195
* Overrides the return of the field type from the metadata. If the type can not be found, return 'string'.
195-
* @param {string} fieldName - The field name for which we want to get the type.
196-
* @returns {TypeOutfieldsType} The type of the field or 'string' when undefined.
197-
* @override
198-
* @protected
196+
*
197+
* @param fieldName - The field name for which we want to get the type.
198+
* @returns The type of the field or 'string' when undefined.
199199
*/
200200
protected override onGetFieldType(fieldName: string): TypeOutfieldsType {
201201
// By default, look into the layer metadata for information on the field types
@@ -206,6 +206,7 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
206206

207207
/**
208208
* Overridable method called to get a more specific error code for all errors.
209+
*
209210
* @param event - The event which is being triggered.
210211
* @returns The GeoViewError stored in the GVVectorSource if any or the one from the parent method.
211212
*/
@@ -227,12 +228,11 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
227228

228229
/**
229230
* Overrides the get all feature information for all the features stored in the layer.
230-
* @param {OLMap} map - The Map so that we can grab the resolution/projection we want to get features on.
231-
* @param {LayerFilters} layerFilters - The layer filters to apply when querying the features.
232-
* @param {AbortController?} [abortController] - The optional abort controller.
233-
* @returns {Promise<TypeFeatureInfoResult>} A promise of a TypeFeatureInfoResult.
234-
* @override
235-
* @protected
231+
*
232+
* @param map - The Map so that we can grab the resolution/projection we want to get features on.
233+
* @param layerFilters - The layer filters to apply when querying the features.
234+
* @param abortController - The optional abort controller.
235+
* @returns A promise of a TypeFeatureInfoResult.
236236
*/
237237
protected override getAllFeatureInfo(
238238
// eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -258,11 +258,10 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
258258

259259
/**
260260
* Overrides the return of feature information at a given pixel location.
261-
* @param {OLMap} map - The Map where to get Feature Info At Pixel from.
262-
* @param {Pixel} location - The pixel coordinate that will be used by the query.
263-
* @returns {Promise<TypeFeatureInfoResult>} A promise of a TypeFeatureInfoResult.
264-
* @override
265-
* @protected
261+
*
262+
* @param map - The Map where to get Feature Info At Pixel from.
263+
* @param location - The pixel coordinate that will be used by the query.
264+
* @returns A promise of a TypeFeatureInfoResult.
266265
*/
267266
protected override getFeatureInfoAtPixel(map: OLMap, location: Pixel): Promise<TypeFeatureInfoResult> {
268267
// Get the layer source
@@ -298,13 +297,12 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
298297

299298
/**
300299
* Overrides the return of feature information at a given coordinate.
301-
* @param {OLMap} map - The Map where to get Feature Info At Coordinate from.
302-
* @param {Coordinate} location - The coordinate that will be used by the query.
303-
* @param {boolean} queryGeometry - Whether to include geometry in the query, default is true.
304-
* @param {AbortController?} [abortController] - The optional abort controller.
305-
* @returns {Promise<TypeFeatureInfoResult>} A promise of a TypeFeatureInfoResult.
306-
* @override
307-
* @protected
300+
*
301+
* @param map - The Map where to get Feature Info At Coordinate from.
302+
* @param location - The coordinate that will be used by the query.
303+
* @param queryGeometry - Whether to include geometry in the query, default is true.
304+
* @param abortController - The optional abort controller.
305+
* @returns A promise of a TypeFeatureInfoResult.
308306
*/
309307
protected override getFeatureInfoAtCoordinate(
310308
map: OLMap,
@@ -320,13 +318,12 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
320318

321319
/**
322320
* Overrides the return of feature information at the provided long lat coordinate.
323-
* @param {OLMap} map - The Map where to get Feature Info At LonLat from.
324-
* @param {Coordinate} lonlat - The coordinate that will be used by the query.
325-
* @param {boolean} queryGeometry - Whether to include geometry in the query, default is true.
326-
* @param {AbortController?} [abortController] - The optional abort controller.
327-
* @returns {Promise<TypeFeatureInfoResult>} A promise of a TypeFeatureInfoResult.
328-
* @override
329-
* @protected
321+
*
322+
* @param map - The Map where to get Feature Info At LonLat from.
323+
* @param lonlat - The coordinate that will be used by the query.
324+
* @param queryGeometry - Whether to include geometry in the query, default is true.
325+
* @param abortController - The optional abort controller.
326+
* @returns A promise of a TypeFeatureInfoResult.
330327
*/
331328
protected override getFeatureInfoAtLonLat(
332329
map: OLMap,
@@ -345,6 +342,7 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
345342

346343
/**
347344
* Overrides the way to get the bounds for this layer type.
345+
*
348346
* @param projection - The projection to get the bounds into.
349347
* @param stops - The number of stops to use to generate the extent.
350348
* @returns A promise of layer bounding box.
@@ -369,11 +367,11 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
369367

370368
/**
371369
* Gets the extent of an array of features.
372-
* @param {number[] | string[]} objectIds - The uids of the features to calculate the extent from.
373-
* @param {OLProjection} outProjection - The output projection for the extent.
374-
* @param {string?} outfield - ID field to return for services that require a value in outfields.
375-
* @returns {Promise<Extent>} The extent of the features, if available.
376-
* @override
370+
*
371+
* @param objectIds - The uids of the features to calculate the extent from.
372+
* @param outProjection - The output projection for the extent.
373+
* @param outfield - ID field to return for services that require a value in outfields.
374+
* @returns The extent of the features, if available.
377375
*/
378376
// eslint-disable-next-line @typescript-eslint/no-unused-vars
379377
override onGetExtentFromFeatures(objectIds: number[] | string[], outProjection: OLProjection, outfield?: string): Promise<Extent> {
@@ -416,7 +414,8 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
416414

417415
/**
418416
* Sets the style applied flag indicating when a style has been applied for the AbstractGVVector via the style callback function.
419-
* @param {boolean} styleApplied - Indicates if the style has been applied on the AbstractGVVector.
417+
*
418+
* @param styleApplied - Indicates if the style has been applied on the AbstractGVVector.
420419
*/
421420
setStyleApplied(styleApplied: boolean): void {
422421
const changed = this.styleApplied !== styleApplied;
@@ -426,15 +425,17 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
426425

427426
/**
428427
* Gets the OpenLayers text layer if one exists.
429-
* @returns {VectorLayer<VectorSource> | undefined} The text layer or undefined if no text layer exists.
428+
*
429+
* @returns The text layer or undefined if no text layer exists.
430430
*/
431431
getTextOLLayer(): VectorLayer<VectorSource> | undefined {
432432
return this.#textOLLayer;
433433
}
434434

435435
/**
436436
* Gets the independent visibility state of the text layer.
437-
* @returns {boolean} True if text layer is set to visible independently.
437+
*
438+
* @returns True if text layer is set to visible independently.
438439
*/
439440
getTextVisible(): boolean {
440441
return this.#textVisible;
@@ -443,7 +444,8 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
443444
/**
444445
* Sets the independent visibility of the text layer.
445446
* The text layer's actual visibility is: layerVisible && textVisible
446-
* @param {boolean} visible - Whether text should be visible independently.
447+
*
448+
* @param visible - Whether text should be visible independently.
447449
*/
448450
setTextVisible(visible: boolean): void {
449451
this.#textVisible = visible;
@@ -460,7 +462,8 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
460462
/**
461463
* Gets the actual visibility state of the text layer on the map.
462464
* This considers both layer visibility and independent text visibility.
463-
* @returns {boolean} True if the text layer is currently visible on the map.
465+
*
466+
* @returns True if the text layer is currently visible on the map.
464467
*/
465468
getTextLayerVisible(): boolean {
466469
return this.#textOLLayer?.getVisible() ?? false;
@@ -472,8 +475,8 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
472475

473476
/**
474477
* Emits an event to all handlers.
475-
* @param {StyleAppliedEvent} event - The event to emit
476-
* @private
478+
*
479+
* @param event - The event to emit
477480
*/
478481
#emitStyleApplied(event: StyleAppliedEvent): void {
479482
// Emit the event for all handlers
@@ -482,7 +485,8 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
482485

483486
/**
484487
* Registers a style applied event handler.
485-
* @param {StyleAppliedDelegate} callback - The callback to be executed whenever the event is emitted
488+
*
489+
* @param callback - The callback to be executed whenever the event is emitted
486490
*/
487491
onStyleApplied(callback: StyleAppliedDelegate): void {
488492
// Register the event handler
@@ -491,7 +495,8 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
491495

492496
/**
493497
* Unregisters a style applied event handler.
494-
* @param {StyleAppliedDelegate} callback - The callback to stop being called whenever the event is emitted
498+
*
499+
* @param callback - The callback to stop being called whenever the event is emitted
495500
*/
496501
offStyleApplied(callback: StyleAppliedDelegate): void {
497502
// Unregister the event handler
@@ -500,24 +505,26 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
500505

501506
/**
502507
* Emits an event to all handlers.
503-
* @param {TextVisibleChangedEvent} event - The event to emit
504-
* @private
508+
*
509+
* @param event - The event to emit
505510
*/
506511
#emitTextVisibleChanged(event: TextVisibleChangedEvent): void {
507512
EventHelper.emitEvent(this, this.#onTextVisibleChangedHandlers, event);
508513
}
509514

510515
/**
511516
* Registers a text visible changed event handler.
512-
* @param {TextVisibleChangedDelegate} callback - The callback to be executed whenever the event is emitted
517+
*
518+
* @param callback - The callback to be executed whenever the event is emitted
513519
*/
514520
onTextVisibleChanged(callback: TextVisibleChangedDelegate): void {
515521
EventHelper.onEvent(this.#onTextVisibleChangedHandlers, callback);
516522
}
517523

518524
/**
519525
* Unregisters a text visible changed event handler.
520-
* @param {TextVisibleChangedDelegate} callback - The callback to stop being called whenever the event is emitted
526+
*
527+
* @param callback - The callback to stop being called whenever the event is emitted
521528
*/
522529
offTextVisibleChanged(callback: TextVisibleChangedDelegate): void {
523530
EventHelper.offEvent(this.#onTextVisibleChangedHandlers, callback);
@@ -529,11 +536,12 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
529536

530537
/**
531538
* Calculates a style for the given feature, based on the layer current style and options.
532-
* @param {AbstractGVLayer} layer - The layer on which to work for the style.
533-
* @param {FeatureLike} feature - Feature that need its style to be defined.
534-
* @param {string} label - The style label when one has to be created
535-
* @param {FilterNodeType[]} filterEquation - Filter equation associated to the layer.
536-
* @returns {Style} The style for the feature
539+
*
540+
* @param layer - The layer on which to work for the style.
541+
* @param feature - Feature that need its style to be defined.
542+
* @param label - The style label when one has to be created
543+
* @param filterEquation - Filter equation associated to the layer.
544+
* @returns The style for the feature
537545
*/
538546
static calculateStyleForFeature(
539547
layer: AbstractGVLayer,
@@ -560,11 +568,11 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
560568

561569
/**
562570
* Calculates a text-only style (no geometry) for the given feature.
563-
* @param {AbstractGVLayer} layer - The layer on which to work for the style.
564-
* @param {FeatureLike} feature - Feature that needs its style defined.
565-
* @param {number} resolution - The map resolution.
566-
* @returns {Style | undefined} The text-only style.
567-
* @static
571+
*
572+
* @param layer - The layer on which to work for the style.
573+
* @param feature - Feature that needs its style defined.
574+
* @param resolution - The map resolution.
575+
* @returns The text-only style.
568576
*/
569577
static calculateTextStyleForFeature(layer: AbstractGVLayer, feature: FeatureLike, resolution: number): Style | undefined {
570578
// Get the layer config and style

0 commit comments

Comments
 (0)