Skip to content

Commit

Permalink
removed interpolate function from getColorPM (#176)
Browse files Browse the repository at this point in the history
Co-authored-by: Nik Sauer <nik.sauer@luftdaten.at>
  • Loading branch information
n11ik and Nik Sauer authored Feb 24, 2025
1 parent f79e110 commit d9ee10f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ <h5 class="card-title mb-3">
for (let i = 0; i < colorSteps.length - 1; i++) {
if (value >= colorSteps[i][0] && value < colorSteps[i + 1][0]) {
const fraction = (value - colorSteps[i][0]) / (colorSteps[i + 1][0] - colorSteps[i][0]);
return interpolate(colorSteps[i][1], colorSteps[i + 1][1], fraction);
return colorSteps[i][1];
}
}
return colorSteps[colorSteps.length - 1][1];
Expand Down

0 comments on commit d9ee10f

Please sign in to comment.