diff --git a/react/src/lib/components/DeckGLMap/layers/layersDefaultProps.ts b/react/src/lib/components/DeckGLMap/layers/layersDefaultProps.ts index 64a2a244f..5ff988390 100644 --- a/react/src/lib/components/DeckGLMap/layers/layersDefaultProps.ts +++ b/react/src/lib/components/DeckGLMap/layers/layersDefaultProps.ts @@ -6,7 +6,7 @@ export const layersDefaultProps: Record = { pickable: true, visible: true, valueRange: { type: "array", value: [0, 1] }, - colorMapRange: { type: "array", value: [0, 1] }, + colorMapRange: { type: "array" }, valueDecoder: { rgbScaler: [1, 1, 1], // By default, scale the [0, 256*256*256-1] decoded values to [0, 1] @@ -75,7 +75,6 @@ export const layersDefaultProps: Record = { // Bounding box of the terrain image, [minX, minY, maxX, maxY] in world coordinates bounds: { type: "array", value: null, false: true, compare: true }, propertyValueRange: { type: "array", value: [0, 1] }, - colorMapRange: { type: "array", value: [0, 1] }, rotDeg: 0, contours: [-1.0, -1.0], // If contour lines should follow depth or properties. diff --git a/react/src/lib/components/DeckGLMap/layers/terrain/terrainMapLayer.ts b/react/src/lib/components/DeckGLMap/layers/terrain/terrainMapLayer.ts index 0584c2eaf..25c54fe10 100644 --- a/react/src/lib/components/DeckGLMap/layers/terrain/terrainMapLayer.ts +++ b/react/src/lib/components/DeckGLMap/layers/terrain/terrainMapLayer.ts @@ -80,7 +80,6 @@ const defaultProps = { contours: [-1, -1], colorMapName: "", propertyValueRange: [0.0, 1.0], - colorMapRange: [0.0, 1.0], isReadoutDepth: false, isContoursDepth: true, coordinateSystem: COORDINATE_SYSTEM.CARTESIAN, @@ -185,8 +184,8 @@ export default class TerrainMapLayer extends SimpleMeshLayer< let value = (r + g + b) * (isPropertyReadout ? floatScaler : 1.0); if (isPropertyReadout) { - // Remap the [0, 1] decoded value to colorMapRange. - const [min, max] = this.props.colorMapRange; + // Remap the [0, 1] decoded value to property value range. + const [min, max] = this.props.propertyValueRange; value = value * (max - min) + min; } diff --git a/react/src/lib/components/DeckGLMap/storybook/DeckGLMap.stories.jsx b/react/src/lib/components/DeckGLMap/storybook/DeckGLMap.stories.jsx index 3be65a2e2..64fd55f15 100644 --- a/react/src/lib/components/DeckGLMap/storybook/DeckGLMap.stories.jsx +++ b/react/src/lib/components/DeckGLMap/storybook/DeckGLMap.stories.jsx @@ -280,7 +280,6 @@ const meshMapLayer = { contours: [0, 50.0], isContoursDepth: true, colorMapName: "Physics", - colorMapRange: [2782, 3513], }; export const KhMapMesh = MinimalTemplate.bind({}); KhMapMesh.args = {