-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #685 from dali-lab/feat/map-navigation-enhancements
feat: enhance map navigation, remove the details overlay
- Loading branch information
Showing
7 changed files
with
118 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* eslint-disable prefer-destructuring */ | ||
const colors = [ | ||
'#86CCFF', | ||
'#FFC148', | ||
'#FFA370', | ||
'#FF525C', | ||
'#CB4767', | ||
'#6B1B38', | ||
]; | ||
|
||
const colorNames = [ | ||
'blue', | ||
'yellow', | ||
'orange', | ||
'brightRed', | ||
'darkerRed', | ||
'darkRed', | ||
]; | ||
|
||
const getFillColor = (fillProb) => { | ||
let color, colorName; | ||
if (fillProb <= 0.025) { | ||
color = colors[0]; | ||
colorName = colorNames[0]; | ||
} else if (fillProb > 0.025 && fillProb <= 0.05) { | ||
color = colors[1]; | ||
colorName = colorNames[1]; | ||
} else if (fillProb > 0.05 && fillProb <= 0.15) { | ||
color = colors[2]; | ||
colorName = colorNames[2]; | ||
} else if (fillProb > 0.15 && fillProb <= 0.25) { | ||
color = colors[3]; | ||
colorName = colorNames[3]; | ||
} else if (fillProb > 0.25 && fillProb <= 0.4) { | ||
color = colors[4]; | ||
colorName = colorNames[4]; | ||
} else { | ||
color = colors[5]; | ||
colorName = colorNames[5]; | ||
} | ||
return { color, colorName }; | ||
}; | ||
|
||
export default getFillColor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters