readded degreesign

This commit is contained in:
fwitte 2019-01-05 13:13:53 +01:00
parent 55464ed0dd
commit ba8685a122
2 changed files with 14 additions and 8 deletions

View File

@ -198,16 +198,19 @@ Module.register("currentweather",{
large.appendChild(weatherIcon);
var degreeLabel = "";
if (this.config.degreeLabel) {
switch (this.config.units ) {
if (this.config.units === "metric" || this.config.units === "imperial") {
degreeLabel += "°";
}
if(this.config.degreeLabel) {
switch(this.config.units) {
case "metric":
degreeLabel = " °C";
degreeLabel += "C";
break;
case "imperial":
degreeLabel = " °F";
degreeLabel += "F";
break;
case "default":
degreeLabel = " K";
degreeLabel += "K";
break;
}
}

View File

@ -143,16 +143,19 @@ Module.register("weatherforecast",{
iconCell.appendChild(icon);
var degreeLabel = "";
if (this.config.units === "metric" || this.config.units === "imperial") {
degreeLabel += "°";
}
if(this.config.scale) {
switch(this.config.units) {
case "metric":
degreeLabel = " °C";
degreeLabel += "C";
break;
case "imperial":
degreeLabel = " °F";
degreeLabel += "F";
break;
case "default":
degreeLabel = " K";
degreeLabel = "K";
break;
}
}