refactor: remove coverage report and add weather widget and navigation utility files
This commit is contained in:
@@ -53,7 +53,9 @@ const lakes = lakesConfig.map(lake => {
|
||||
}
|
||||
}
|
||||
|
||||
if (lake.minLevel && lake.maxLevel && currentLevel > 0) {
|
||||
if (volume > 0 && lake.maxVolume && lake.maxVolume > 0) {
|
||||
capacity = Math.max(0, Math.min(100, Math.round((volume / lake.maxVolume) * 1000) / 10));
|
||||
} else if (lake.minLevel && lake.maxLevel && currentLevel > 0) {
|
||||
const percentage = ((currentLevel - lake.minLevel) / (lake.maxLevel - lake.minLevel)) * 100;
|
||||
capacity = Math.max(0, Math.min(100, Math.round(percentage * 10) / 10)); // Round to 1 decimal place
|
||||
if (volume === 0) {
|
||||
|
||||
Reference in New Issue
Block a user