Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Johann Levesque authored and Johann Levesque committed May 21, 2024
1 parent e0c8e97 commit 4a35462
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class TimeSliderEventProcessor extends AbstractEventProcessor {
static getInitialTimeSliderValues(mapId: string, layerConfig: TypeLayerEntryConfig): TypeTimeSliderValues | undefined {
// Get the layer using the map event processor, If no temporal dimension OR layerPath, return undefined
if (!layerConfig.layerPath) return undefined;
const geoviewLayer = MapEventProcessor.getMapViewerLayerAPI(mapId).geoviewLayer(layerConfig.layerPath);
const geoviewLayer = MapEventProcessor.getMapViewerLayerAPI(mapId).getGeoviewLayer(layerConfig.layerPath)!;
const temporalDimensionInfo = geoviewLayer.getTemporalDimension(layerConfig.layerPath);
if (!temporalDimensionInfo || !temporalDimensionInfo.range) return undefined;

Expand Down Expand Up @@ -174,7 +174,7 @@ export class TimeSliderEventProcessor extends AbstractEventProcessor {
values: number[]
): void {
// Get the layer using the map event processor
const geoviewLayer = MapEventProcessor.getMapViewerLayerAPI(mapId).geoviewLayer(layerPath);
const geoviewLayer = MapEventProcessor.getMapViewerLayerAPI(mapId).getGeoviewLayer(layerPath)!;

const layerType = geoviewLayer.type;
if (layerType === CONST_LAYER_TYPES.WMS) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function initializeTimeSliderState(set: TypeSetStore, get: TypeGetStore):
get().timeSliderState.setterActions.setDelay(layerPath, delay);
},
setFiltering(layerPath: string, filtering: boolean): void {
// Redirect to TimeSlidierEventProcessor
// Redirect to TimeSliderEventProcessor
const { defaultValue, field, minAndMax, values } = get().timeSliderState.timeSliderLayers[layerPath];
TimeSliderEventProcessor.applyFilters(get().mapId, layerPath, defaultValue, field, filtering, minAndMax, values);
},
Expand All @@ -104,7 +104,7 @@ export function initializeTimeSliderState(set: TypeSetStore, get: TypeGetStore):
get().timeSliderState.setterActions.setDefaultValue(layerPath, defaultValue);
},
setValues(layerPath: string, values: number[]): void {
// Redirect to TimeSlidierEventProcessor
// Redirect to TimeSliderEventProcessor
const { defaultValue, field, minAndMax, filtering } = get().timeSliderState.timeSliderLayers[layerPath];
TimeSliderEventProcessor.applyFilters(get().mapId, layerPath, defaultValue, field, filtering, minAndMax, values);
},
Expand Down

0 comments on commit 4a35462

Please sign in to comment.