Fixed resolution bug when switching to higher resolution

This commit is contained in:
Daniel Ledda
2021-03-23 16:59:47 +01:00
parent b7873ab7db
commit c6d0a24805

View File

@@ -96,6 +96,8 @@ export default class ClimateChart {
const pixelsPerPoint = chartWidth / points;
if (pixelsPerPoint < MIN_PIXELS_PER_POINT) {
this.resolution = Math.ceil(MIN_PIXELS_PER_POINT / pixelsPerPoint);
} else {
this.resolution = 1;
}
}