Skip to content

Commit

Permalink
using dataset titles instead of ids in layer visibility window
Browse files Browse the repository at this point in the history
  • Loading branch information
forman committed May 31, 2024
1 parent c1c72d5 commit 0221b42
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/selectors/controlSelectors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1264,30 +1264,30 @@ export const layerTitlesSelector = (
export const layerSubtitlesSelector = createSelector(
selectedBaseMapTitleSelector,
selectedOverlayTitleSelector,
selectedDatasetIdSelector,
selectedDatasetSelector,
selectedVariableNameSelector,
selectedDataset2IdSelector,
selectedDataset2Selector,
selectedVariable2NameSelector,
(
baseMapTitle,
overlayTitle,
datasetId,
dataset,
variableName,
dataset2Id,
dataset2,
variable2Name,
) =>
({
baseMap: baseMapTitle || undefined,
overlay: overlayTitle || undefined,
datasetRgb: datasetId || undefined,
datasetRgb2: dataset2Id || undefined,
datasetRgb: dataset ? dataset.title : undefined,
datasetRgb2: dataset2 ? dataset2.title : undefined,
datasetVariable:
datasetId && variableName
? `${datasetId} / ${variableName}`
dataset && variableName
? `${dataset.title} / ${variableName}`
: undefined,
datasetVariable2:
dataset2Id && variable2Name
? `${dataset2Id} / ${variable2Name}`
dataset2 && variable2Name
? `${dataset2.title} / ${variable2Name}`
: undefined,
}) as Record<keyof LayerVisibilities, string>,
);
Expand Down

0 comments on commit 0221b42

Please sign in to comment.