Skip to content

Commit b922fee

Browse files
committed
Use RDYLBU_R as default color instead of DEFAULT for velocity layers
1 parent 6c4d74e commit b922fee

File tree

3 files changed

+3
-52
lines changed

3 files changed

+3
-52
lines changed

configure/src/core/injectables.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { data as colormapData } from '../external/js-colormaps.js'
44
const injectablesDefaults = {
55
TILE_MATRIX_SETS: ["WebMercatorQuad"],
66
COLORMAP_NAMES: ["viridis"],
7-
VELOCITY_COLORMAP_NAMES: ["DEFAULT"],
7+
VELOCITY_COLORMAP_NAMES: ["RDYLBU_R"],
88
};
99
// Initialize with reasonable defaults
1010
const injectables = {

configure/src/metaconfigs/layer-velocity-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
"description": "Set of colors for visualizing velocity magnitude values.",
194194
"type": "colordropdown",
195195
"width": 9,
196-
"default": "DEFAULT",
196+
"default": "RDYLBU_R",
197197
"options": "{{VELOCITY_COLORMAP_NAMES}}"
198198
},
199199
{

src/essence/Tools/Layers/LayersTool.js

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -76,43 +76,7 @@ const IMAGE_DEFAULT_COLOR_RAMP = 'binary'
7676
const TILE_DEFAULT_COLOR_RAMP = 'viridis'
7777

7878
// The default color ramp used for velocity layer types
79-
const VELOCITY_DEFAULT_COLOR_RAMP = 'DEFAULT'
80-
81-
const velocityDefaultColorsRGB = [
82-
'rgb(36,104, 180)',
83-
'rgb(60,157, 194)',
84-
'rgb(128,205,193 )',
85-
'rgb(151,218,168 )',
86-
'rgb(198,231,181)',
87-
'rgb(238,247,217)',
88-
'rgb(255,238,159)',
89-
'rgb(252,217,125)',
90-
'rgb(255,182,100)',
91-
'rgb(252,150,75)',
92-
'rgb(250,112,52)',
93-
'rgb(245,64,32)',
94-
'rgb(237,45,28)',
95-
'rgb(220,24,32)',
96-
'rgb(180,0,35)',
97-
]
98-
99-
const velocityDefaultColorsHex = [
100-
[0.1412,0.4078,0.7059],
101-
[0.2353,0.6157,0.7608],
102-
[0.502,0.8039,0.7569],
103-
[0.5922,0.8549,0.6588],
104-
[0.7765,0.9059,0.7098],
105-
[0.9333,0.9686,0.851],
106-
[1,0.9333,0.6235],
107-
[0.9882,0.851,0.4902],
108-
[1,0.7137,0.3922],
109-
[0.9882,0.5882,0.2941],
110-
[0.9804,0.4392,0.2039],
111-
[0.9608,0.251,0.1255],
112-
[0.9294,0.1765,0.1098],
113-
[0.8627,0.0941,0.1255],
114-
[0.7059,0,0.1373],
115-
]
79+
const VELOCITY_DEFAULT_COLOR_RAMP = 'rdylbu_r'
11680

11781
var LayersTool = {
11882
height: 0,
@@ -305,19 +269,6 @@ var LayersTool = {
305269
: layer?.variables?.streamlines?.colorScale;
306270
let { colormap, reverse } = LayersTool.findJSColormap(layer, layerColormap)
307271

308-
if (colormap === VELOCITY_DEFAULT_COLOR_RAMP) {
309-
// Handle the case where the velocity layer colormap is 'DEFAULT'
310-
velocityDefaultColorsRGB.forEach((color) => {
311-
dynamicLegendConf.push({
312-
color,
313-
strokecolor: null,
314-
shape: 'continuous',
315-
value: '', // FIXME This should be fixed when the metaconfig is updated with units, etc
316-
})
317-
})
318-
break
319-
}
320-
321272
let scaledPixelValue
322273
if (min !== undefined && max !== undefined) {
323274
// scale from 0 - 1

0 commit comments

Comments
 (0)