Skip to content

Commit

Permalink
Merge pull request #931 from Deltares/DWO-769-Front-end_Do_not_allow_…
Browse files Browse the repository at this point in the history
…double-click_on_map_for_layers_without_data_type_COVERAGE

Only allow double clicking on a wms map if the layers are all grids.
  • Loading branch information
ekkelenkamp authored Jun 19, 2024
2 parents a79f045 + da67ec7 commit 1dd4299
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/spatialdisplay/SpatialDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,20 @@ const end = computed(() => {
if (!times.value || times.value.length === 0) return null
return times.value[times.value.length - 1]
})
const maxValuesTimeSeries = useWmsMaxValuesTimeSeries(
baseUrl,
() => props.layerName,
start,
end,
)
const onlyCoverageLayersAvailable = computed(() =>
layerCapabilities.value?.keywordList?.every(
(keyword) => keyword.type === 'COVERAGE',
),
)
function getFilterActionsFilter(): filterActionsFilter &
UseDisplayConfigOptions {
return {
Expand Down Expand Up @@ -197,6 +204,7 @@ function onCoordinateClick(latitude: number, longitude: number): void {
}
function openCoordinatesTimeSeriesDisplay(latitude: number, longitude: number) {
if (!onlyCoverageLayersAvailable.value) return
const routeName = route.name
?.toString()
.replace('SpatialDisplay', 'SpatialTimeSeriesDisplay')
Expand Down

0 comments on commit 1dd4299

Please sign in to comment.