|
|
@@ -187,12 +187,13 @@ eventBus.on('rainLegend2', (e) => {
|
|
|
let maxIndex=0
|
|
|
colors.forEach((i,index)=>{
|
|
|
if(e.min<i.max&&e.min>=i.min){
|
|
|
- minIndex=index
|
|
|
+ maxIndex=index
|
|
|
}
|
|
|
if(e.max<i.max&&e.max>=i.min){
|
|
|
- maxIndex=index
|
|
|
+ minIndex=index
|
|
|
}
|
|
|
})
|
|
|
+ debugger
|
|
|
rainLegendNow2.value = colors.slice(minIndex, maxIndex + 1);
|
|
|
// if (Number(e.max) > 0.5) {
|
|
|
// let level1 = Number(((e.max - 0.5) / 3 + 0.5).toFixed(2))
|