mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 21:00:57 +00:00
implemented roundTemperature in weather modules
This commit is contained in:
@@ -15,6 +15,7 @@ Module.register("currentweather",{
|
||||
locationID: "",
|
||||
appid: "",
|
||||
units: config.units,
|
||||
roundTemperature: false,
|
||||
updateInterval: 10 * 60 * 1000, // every 10 minutes
|
||||
animationSpeed: 1000,
|
||||
timeFormat: config.timeFormat,
|
||||
@@ -149,9 +150,13 @@ Module.register("currentweather",{
|
||||
weatherIcon.className = "wi weathericon " + this.weatherType;
|
||||
large.appendChild(weatherIcon);
|
||||
|
||||
var temp = this.temperature;
|
||||
if (this.config.roundTemperature) {
|
||||
temp = Math.round(temp);
|
||||
}
|
||||
var temperature = document.createElement("span");
|
||||
temperature.className = "bright";
|
||||
temperature.innerHTML = " " + this.temperature + "°";
|
||||
temperature.innerHTML = " " + temp + "°";
|
||||
large.appendChild(temperature);
|
||||
|
||||
wrapper.appendChild(small);
|
||||
|
Reference in New Issue
Block a user