Added wind direction in Current Weather module

This commit is contained in:
Warwolf8.9 2016-04-24 18:06:12 -05:00
parent 8d29bd5c32
commit 2aae0528b5

View File

@ -19,7 +19,7 @@ Module.register("currentweather",{
timeFormat: config.timeFormat,
showPeriod: true,
showPeriodUpper: false,
showDirection: true,
showDirection: false,
lang: config.language,
initialLoadDelay: 0, // 0 seconds delay
@ -115,12 +115,11 @@ Module.register("currentweather",{
windSpeed.innerHTML = " " + this.windSpeed;
small.appendChild(windSpeed);
if (this.showDirection) {
if (this.config.showDirection) {
var windDirection = document.createElement("span");
windDirection.innerHTML = " " + this.windDirection;
small.appendChild(windDirection);
}
var spacer = document.createElement("span");
spacer.innerHTML = " ";
small.appendChild(spacer);
@ -206,9 +205,7 @@ Module.register("currentweather",{
processWeather: function(data) {
this.temperature = this.roundValue(data.main.temp);
this.windSpeed = this.ms2Beaufort(this.roundValue(data.wind.speed));
if (this.showDirection) {
this.windDirection = this.deg2Cardinal(data.wind.deg);
} else {}
this.weatherType = this.config.iconTable[data.weather[0].icon];
var now = new Date();