diff --git a/packages/geoview-core/src/api/event-processors/event-processor-children/time-slider-event-processor.ts b/packages/geoview-core/src/api/event-processors/event-processor-children/time-slider-event-processor.ts index 290a991e62e..6efe62f1fb6 100644 --- a/packages/geoview-core/src/api/event-processors/event-processor-children/time-slider-event-processor.ts +++ b/packages/geoview-core/src/api/event-processors/event-processor-children/time-slider-event-processor.ts @@ -112,6 +112,7 @@ export class TimeSliderEventProcessor extends AbstractEventProcessor { const defaultValue = temporalDimensionInfo.default; const minAndMax: number[] = [new Date(range[0]).getTime(), new Date(range[range.length - 1]).getTime()]; const { field, singleHandle } = temporalDimensionInfo; + // If the field type has an alias, use that as a label let fieldAlias = field; const { featureInfo } = api.maps[mapId].layer.registeredLayers[layerPath].source!; @@ -121,12 +122,7 @@ export class TimeSliderEventProcessor extends AbstractEventProcessor { const fieldIndex = localizedOutFields ? localizedOutFields.indexOf(field) : -1; if (fieldIndex !== -1 && localizedAliasFields?.length === localizedOutFields?.length) fieldAlias = localizedAliasFields![fieldIndex]; - // eslint-disable-next-line no-nested-ternary - const values = singleHandle - ? [new Date(temporalDimensionInfo.default).getTime()] - : defaultValue - ? [new Date(defaultValue[0]).getTime(), new Date(defaultValue[1]).getTime()] - : [...minAndMax]; + const values = singleHandle ? [new Date(temporalDimensionInfo.default).getTime()] : [...minAndMax]; const sliderData: TimeSliderLayerSet = { [layerPath]: { diff --git a/packages/geoview-core/src/core/stores/store-interface-and-intial-values/time-slider-state.ts b/packages/geoview-core/src/core/stores/store-interface-and-intial-values/time-slider-state.ts index 90495fd2425..9816b9f18c6 100644 --- a/packages/geoview-core/src/core/stores/store-interface-and-intial-values/time-slider-state.ts +++ b/packages/geoview-core/src/core/stores/store-interface-and-intial-values/time-slider-state.ts @@ -8,7 +8,6 @@ export type TimeSliderLayerSet = { [layerPath: string]: TypeTimeSliderValues; }; -// #region INTERFACES export interface TypeTimeSliderValues { title?: string; description?: string; diff --git a/packages/geoview-core/src/geo/layer/geoview-layers/abstract-geoview-layers.ts b/packages/geoview-core/src/geo/layer/geoview-layers/abstract-geoview-layers.ts index 30627f54db6..0bc22047626 100644 --- a/packages/geoview-core/src/geo/layer/geoview-layers/abstract-geoview-layers.ts +++ b/packages/geoview-core/src/geo/layer/geoview-layers/abstract-geoview-layers.ts @@ -1500,11 +1500,10 @@ export abstract class AbstractGeoViewLayer { } /** *************************************************************************************************************************** - * Change the layer phase property and emit an event to update existing layer sets. - * Change the layer temporal dimension property and emit an event to update existing layer sets. + * Set the layerTemporalDimension for the layer identified by specified layerPath. * * @param {string} layerPath The layer path to the layer's configuration affected by the change. - * @param {TimeDimension} timeDimension The value to assign to the layer temporal dimension property. + * @param {TimeDimension} temporalDimension The value to assign to the layer temporal dimension property. */ setTemporalDimension(layerPath: string, temporalDimension: TimeDimension): void { layerPath = layerPath || this.layerPathAssociatedToTheGeoviewLayer;