Skip to content
Snippets Groups Projects

Fix decimal values display issue

Merged malzer requested to merge develop into main
1 file
+ 5
5
Compare changes
  • Side-by-side
  • Inline
@@ -59,10 +59,10 @@ const ColorizeComponent = ({ selectedLayer, layoutProperties, selectLayer, lay
{displayedColorBar.map(mapColors)}
<span className="domain-min smallest-text">{rasterMin.toFixed(2)}</span>
<span className="domain-min smallest-text">{rasterMin.toPrecision(2)}</span>
<span
className="domain-med smallest-text">{((rasterMin + rasterMax) * 0.5).toFixed(2)}</span>
<span className="domain-max smallest-text">{rasterMax.toFixed(2)}</span>
className="domain-med smallest-text">{((rasterMin + rasterMax) * 0.5).toPrecision(2)}</span>
<span className="domain-max smallest-text">{rasterMax.toPrecision(2)}</span>
</div>
}
@@ -86,11 +86,11 @@ const ColorizeComponent = ({ selectedLayer, layoutProperties, selectLayer, lay
<TableBody>
<TableRow>
<TableCell className="smaller-text"><strong>Minimum pixel value:</strong></TableCell>
<TableCell className="smaller-text">{rasterMin.toFixed(2)}</TableCell>
<TableCell className="smaller-text">{rasterMin.toPrecision(2)}</TableCell>
</TableRow>
<TableRow>
<TableCell className="smaller-text"><strong>Maximum pixel value:</strong></TableCell>
<TableCell className="smaller-text">{rasterMax.toFixed(2)}</TableCell>
<TableCell className="smaller-text">{rasterMax.toPrecision(2)}</TableCell>
</TableRow>
<TableRow>
<TableCell className="smaller-text"><strong>No Data value:</strong></TableCell>
Loading