[gnome-weather] Fix hourly graph displaying different data for C or F



commit b0657cd0f2f5aea18af62a38e582f99bf5af77bc
Author: Jessica Tallon <tsyesika tsyesika se>
Date:   Sun Apr 11 09:27:34 2021 +0200

    Fix hourly graph displaying different data for C or F
    
    The hourly forcast graph showed less information in Celsius due to
    rounding the numbers, where as in fahrenheit it showed more information.
    This fixes it by not rounding the numbers when plotting the graph making
    it the same graph no matter the unit used.

 src/app/hourlyForecast.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/app/hourlyForecast.js b/src/app/hourlyForecast.js
index 7f2da5d..1e7a11f 100644
--- a/src/app/hourlyForecast.js
+++ b/src/app/hourlyForecast.js
@@ -136,7 +136,7 @@ var HourlyForecastBox = GObject.registerClass(class HourlyForecastBox extends Gt
     }
 
     vfunc_draw(cr) {
-        const temps = this._hourlyInfo.map(info => Math.round(Util.getTemp(info)));
+        const temps = this._hourlyInfo.map(info => Util.getTemp(info));
 
         const maxTemp = Math.max(...temps);
         const minTemp = Math.min(...temps);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]