Skip to content

Commit

Permalink
Merge pull request #923 from Deltares/922-do-not-use-colorscalerange-…
Browse files Browse the repository at this point in the history
…by-default-in-getlegendgraphic-requests

Only send custom range for color scales when it has been modified
  • Loading branch information
hvangeffen authored Jun 18, 2024
2 parents bfa6f63 + b731d5e commit f31c51f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/spatialdisplay/SpatialDisplayComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,18 @@ watch(
})
colourScalesStore.scales[styleId] = newColourScale
const range = computed(() => {
const newRange = rangeToString(newColourScale.range)
const initialRange = rangeToString(newColourScale.initialRange)
return newRange !== initialRange ? newRange : undefined
})
const newLegendGraphic = useWmsLegend(
baseUrl,
legendLayerName,
() => settings.useDisplayUnits,
() => rangeToString(newColourScale.range),
range,
style,
() => props.layerCapabilities?.styles ?? [],
)
Expand Down

0 comments on commit f31c51f

Please sign in to comment.