Skip to content

Commit fa0f6e9

Browse files
JS Doc cleanup
1 parent bd70b22 commit fa0f6e9

File tree

1 file changed

+63
-54
lines changed

1 file changed

+63
-54
lines changed

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

Lines changed: 63 additions & 54 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,6 +193,7 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
192193

193194
/**
194195
* Overridable method called to get a more specific error code for all errors.
196+
*
195197
* @param event - The event which is being triggered.
196198
* @returns The GeoViewError stored in the GVVectorSource if any or the one from the parent method.
197199
*/
@@ -213,12 +215,11 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
213215

214216
/**
215217
* Overrides the get all feature information for all the features stored in the layer.
216-
* @param {OLMap} map - The Map so that we can grab the resolution/projection we want to get features on.
217-
* @param {LayerFilters} layerFilters - The layer filters to apply when querying the features.
218-
* @param {AbortController?} [abortController] - The optional abort controller.
219-
* @returns {Promise<TypeFeatureInfoResult>} A promise of a TypeFeatureInfoResult.
220-
* @override
221-
* @protected
218+
*
219+
* @param map - The Map so that we can grab the resolution/projection we want to get features on.
220+
* @param layerFilters - The layer filters to apply when querying the features.
221+
* @param abortController - The optional abort controller.
222+
* @returns A promise of a TypeFeatureInfoResult.
222223
*/
223224
protected override getAllFeatureInfo(
224225
// eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -244,11 +245,10 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
244245

245246
/**
246247
* Overrides the return of feature information at a given pixel location.
247-
* @param {OLMap} map - The Map where to get Feature Info At Pixel from.
248-
* @param {Pixel} location - The pixel coordinate that will be used by the query.
249-
* @returns {Promise<TypeFeatureInfoResult>} A promise of a TypeFeatureInfoResult.
250-
* @override
251-
* @protected
248+
*
249+
* @param map - The Map where to get Feature Info At Pixel from.
250+
* @param location - The pixel coordinate that will be used by the query.
251+
* @returns A promise of a TypeFeatureInfoResult.
252252
*/
253253
protected override getFeatureInfoAtPixel(map: OLMap, location: Pixel): Promise<TypeFeatureInfoResult> {
254254
// Get the layer source
@@ -284,13 +284,12 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
284284

285285
/**
286286
* Overrides the return of feature information at a given coordinate.
287-
* @param {OLMap} map - The Map where to get Feature Info At Coordinate from.
288-
* @param {Coordinate} location - The coordinate that will be used by the query.
289-
* @param {boolean} queryGeometry - Whether to include geometry in the query, default is true.
290-
* @param {AbortController?} [abortController] - The optional abort controller.
291-
* @returns {Promise<TypeFeatureInfoResult>} A promise of a TypeFeatureInfoResult.
292-
* @override
293-
* @protected
287+
*
288+
* @param map - The Map where to get Feature Info At Coordinate from.
289+
* @param location - The coordinate that will be used by the query.
290+
* @param queryGeometry - Whether to include geometry in the query, default is true.
291+
* @param abortController - The optional abort controller.
292+
* @returns A promise of a TypeFeatureInfoResult.
294293
*/
295294
protected override getFeatureInfoAtCoordinate(
296295
map: OLMap,
@@ -306,13 +305,12 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
306305

307306
/**
308307
* Overrides the return of feature information at the provided long lat coordinate.
309-
* @param {OLMap} map - The Map where to get Feature Info At LonLat from.
310-
* @param {Coordinate} lonlat - The coordinate that will be used by the query.
311-
* @param {boolean} queryGeometry - Whether to include geometry in the query, default is true.
312-
* @param {AbortController?} [abortController] - The optional abort controller.
313-
* @returns {Promise<TypeFeatureInfoResult>} A promise of a TypeFeatureInfoResult.
314-
* @override
315-
* @protected
308+
*
309+
* @param map - The Map where to get Feature Info At LonLat from.
310+
* @param lonlat - The coordinate that will be used by the query.
311+
* @param queryGeometry - Whether to include geometry in the query, default is true.
312+
* @param abortController - The optional abort controller.
313+
* @returns A promise of a TypeFeatureInfoResult.
316314
*/
317315
protected override getFeatureInfoAtLonLat(
318316
map: OLMap,
@@ -331,6 +329,7 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
331329

332330
/**
333331
* Overrides the way to get the bounds for this layer type.
332+
*
334333
* @param projection - The projection to get the bounds into.
335334
* @param stops - The number of stops to use to generate the extent.
336335
* @returns A promise of layer bounding box.
@@ -355,11 +354,11 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
355354

356355
/**
357356
* Gets the extent of an array of features.
358-
* @param {number[] | string[]} objectIds - The uids of the features to calculate the extent from.
359-
* @param {OLProjection} outProjection - The output projection for the extent.
360-
* @param {string?} outfield - ID field to return for services that require a value in outfields.
361-
* @returns {Promise<Extent>} The extent of the features, if available.
362-
* @override
357+
*
358+
* @param objectIds - The uids of the features to calculate the extent from.
359+
* @param outProjection - The output projection for the extent.
360+
* @param outfield - ID field to return for services that require a value in outfields.
361+
* @returns The extent of the features, if available.
363362
*/
364363
// eslint-disable-next-line @typescript-eslint/no-unused-vars
365364
override onGetExtentFromFeatures(objectIds: number[] | string[], outProjection: OLProjection, outfield?: string): Promise<Extent> {
@@ -402,7 +401,8 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
402401

403402
/**
404403
* Sets the style applied flag indicating when a style has been applied for the AbstractGVVector via the style callback function.
405-
* @param {boolean} styleApplied - Indicates if the style has been applied on the AbstractGVVector.
404+
*
405+
* @param styleApplied - Indicates if the style has been applied on the AbstractGVVector.
406406
*/
407407
setStyleApplied(styleApplied: boolean): void {
408408
const changed = this.styleApplied !== styleApplied;
@@ -412,15 +412,17 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
412412

413413
/**
414414
* Gets the OpenLayers text layer if one exists.
415-
* @returns {VectorLayer<VectorSource> | undefined} The text layer or undefined if no text layer exists.
415+
*
416+
* @returns The text layer or undefined if no text layer exists.
416417
*/
417418
getTextOLLayer(): VectorLayer<VectorSource> | undefined {
418419
return this.#textOLLayer;
419420
}
420421

421422
/**
422423
* Gets the independent visibility state of the text layer.
423-
* @returns {boolean} True if text layer is set to visible independently.
424+
*
425+
* @returns True if text layer is set to visible independently.
424426
*/
425427
getTextVisible(): boolean {
426428
return this.#textVisible;
@@ -429,7 +431,8 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
429431
/**
430432
* Sets the independent visibility of the text layer.
431433
* The text layer's actual visibility is: layerVisible && textVisible
432-
* @param {boolean} visible - Whether text should be visible independently.
434+
*
435+
* @param visible - Whether text should be visible independently.
433436
*/
434437
setTextVisible(visible: boolean): void {
435438
this.#textVisible = visible;
@@ -446,7 +449,8 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
446449
/**
447450
* Gets the actual visibility state of the text layer on the map.
448451
* This considers both layer visibility and independent text visibility.
449-
* @returns {boolean} True if the text layer is currently visible on the map.
452+
*
453+
* @returns True if the text layer is currently visible on the map.
450454
*/
451455
getTextLayerVisible(): boolean {
452456
return this.#textOLLayer?.getVisible() ?? false;
@@ -458,8 +462,8 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
458462

459463
/**
460464
* Emits an event to all handlers.
461-
* @param {StyleAppliedEvent} event - The event to emit
462-
* @private
465+
*
466+
* @param event - The event to emit
463467
*/
464468
#emitStyleApplied(event: StyleAppliedEvent): void {
465469
// Emit the event for all handlers
@@ -468,7 +472,8 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
468472

469473
/**
470474
* Registers a style applied event handler.
471-
* @param {StyleAppliedDelegate} callback - The callback to be executed whenever the event is emitted
475+
*
476+
* @param callback - The callback to be executed whenever the event is emitted
472477
*/
473478
onStyleApplied(callback: StyleAppliedDelegate): void {
474479
// Register the event handler
@@ -477,7 +482,8 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
477482

478483
/**
479484
* Unregisters a style applied event handler.
480-
* @param {StyleAppliedDelegate} callback - The callback to stop being called whenever the event is emitted
485+
*
486+
* @param callback - The callback to stop being called whenever the event is emitted
481487
*/
482488
offStyleApplied(callback: StyleAppliedDelegate): void {
483489
// Unregister the event handler
@@ -486,24 +492,26 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
486492

487493
/**
488494
* Emits an event to all handlers.
489-
* @param {TextVisibleChangedEvent} event - The event to emit
490-
* @private
495+
*
496+
* @param event - The event to emit
491497
*/
492498
#emitTextVisibleChanged(event: TextVisibleChangedEvent): void {
493499
EventHelper.emitEvent(this, this.#onTextVisibleChangedHandlers, event);
494500
}
495501

496502
/**
497503
* Registers a text visible changed event handler.
498-
* @param {TextVisibleChangedDelegate} callback - The callback to be executed whenever the event is emitted
504+
*
505+
* @param callback - The callback to be executed whenever the event is emitted
499506
*/
500507
onTextVisibleChanged(callback: TextVisibleChangedDelegate): void {
501508
EventHelper.onEvent(this.#onTextVisibleChangedHandlers, callback);
502509
}
503510

504511
/**
505512
* Unregisters a text visible changed event handler.
506-
* @param {TextVisibleChangedDelegate} callback - The callback to stop being called whenever the event is emitted
513+
*
514+
* @param callback - The callback to stop being called whenever the event is emitted
507515
*/
508516
offTextVisibleChanged(callback: TextVisibleChangedDelegate): void {
509517
EventHelper.offEvent(this.#onTextVisibleChangedHandlers, callback);
@@ -515,11 +523,12 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
515523

516524
/**
517525
* Calculates a style for the given feature, based on the layer current style and options.
518-
* @param {AbstractGVLayer} layer - The layer on which to work for the style.
519-
* @param {FeatureLike} feature - Feature that need its style to be defined.
520-
* @param {string} label - The style label when one has to be created
521-
* @param {FilterNodeType[]} filterEquation - Filter equation associated to the layer.
522-
* @returns {Style} The style for the feature
526+
*
527+
* @param layer - The layer on which to work for the style.
528+
* @param feature - Feature that need its style to be defined.
529+
* @param label - The style label when one has to be created
530+
* @param filterEquation - Filter equation associated to the layer.
531+
* @returns The style for the feature
523532
*/
524533
static calculateStyleForFeature(
525534
layer: AbstractGVLayer,
@@ -546,11 +555,11 @@ export abstract class AbstractGVVector extends AbstractGVLayer {
546555

547556
/**
548557
* Calculates a text-only style (no geometry) for the given feature.
549-
* @param {AbstractGVLayer} layer - The layer on which to work for the style.
550-
* @param {FeatureLike} feature - Feature that needs its style defined.
551-
* @param {number} resolution - The map resolution.
552-
* @returns {Style | undefined} The text-only style.
553-
* @static
558+
*
559+
* @param layer - The layer on which to work for the style.
560+
* @param feature - Feature that needs its style defined.
561+
* @param resolution - The map resolution.
562+
* @returns The text-only style.
554563
*/
555564
static calculateTextStyleForFeature(layer: AbstractGVLayer, feature: FeatureLike, resolution: number): Style | undefined {
556565
// Get the layer config and style

0 commit comments

Comments
 (0)