Skip to content

Commit

Permalink
Apply change to all layers (not just MODIS Flood) & remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomcariello committed Oct 17, 2023
1 parent 4287c86 commit 468c844
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions tasks/build-options/processColormap.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,21 +158,8 @@ async function processEntries (colormap, id) {

// Force alpha value to 255 always
const a = 255

if (id === 'MODIS_Flood') {
console.warn('id', id)
console.warn(entry)
}
// If entry is served transparent, add it to the disabled array
if (entry._attributes.transparent !== 'false') {
if (id === 'MODIS_Flood') {
console.warn('index', index)
console.warn('-*-*-*-*-refsList.length', refsList.length)

initializeDisabled.push(refsList.length)
} else {
initializeDisabled.push(index)
}
initializeDisabled.push(refsList.length)
}

if (!entry._attributes.ref) {
Expand Down Expand Up @@ -280,19 +267,9 @@ async function processEntries (colormap, id) {
tooltips.push(...disabledTooltipsArr)

const firstDisabledIndex = totalEntries - numDisabled
if (id === 'MODIS_Flood') {
console.warn('initializeDisabled before', initializeDisabled)
console.warn('colors', colors)
console.warn('legendColors', legendColors)
console.warn('tooltips', tooltips)
}
initializeDisabled = Array.from({
length: numDisabled
}, (item, index) => firstDisabledIndex + index)

if (id === 'MODIS_Flood') {
console.warn('initializeDisabled after', initializeDisabled)
}
}
}

Expand Down

0 comments on commit 468c844

Please sign in to comment.