Skip to content

Commit

Permalink
new error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
morandd committed Nov 26, 2024
1 parent f735202 commit 142abd3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/Colorbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,16 @@ function updateColorbar() {
for (const value of stops){
const div = document.createElement('div');
// Creat a label that shows three significant digits
try {
const label = value.toPrecision(3);
div.innerHTML = label;
colorbar.appendChild(div);
} catch (e) {
console.log(`Error in updateColorbar. E=`,e);
console.log(`Error in updateColorbar. value`,value);
console.log(`Error in updateColorbar. stops`,stops);
}

}
colorbar.style.background = getPaletteAsGradient();
return;
Expand Down

0 comments on commit 142abd3

Please sign in to comment.