mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
readded degreesign
This commit is contained in:
parent
55464ed0dd
commit
ba8685a122
@ -198,16 +198,19 @@ Module.register("currentweather",{
|
|||||||
large.appendChild(weatherIcon);
|
large.appendChild(weatherIcon);
|
||||||
|
|
||||||
var degreeLabel = "";
|
var degreeLabel = "";
|
||||||
if (this.config.degreeLabel) {
|
if (this.config.units === "metric" || this.config.units === "imperial") {
|
||||||
switch (this.config.units ) {
|
degreeLabel += "°";
|
||||||
|
}
|
||||||
|
if(this.config.degreeLabel) {
|
||||||
|
switch(this.config.units) {
|
||||||
case "metric":
|
case "metric":
|
||||||
degreeLabel = " °C";
|
degreeLabel += "C";
|
||||||
break;
|
break;
|
||||||
case "imperial":
|
case "imperial":
|
||||||
degreeLabel = " °F";
|
degreeLabel += "F";
|
||||||
break;
|
break;
|
||||||
case "default":
|
case "default":
|
||||||
degreeLabel = " K";
|
degreeLabel += "K";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,16 +143,19 @@ Module.register("weatherforecast",{
|
|||||||
iconCell.appendChild(icon);
|
iconCell.appendChild(icon);
|
||||||
|
|
||||||
var degreeLabel = "";
|
var degreeLabel = "";
|
||||||
|
if (this.config.units === "metric" || this.config.units === "imperial") {
|
||||||
|
degreeLabel += "°";
|
||||||
|
}
|
||||||
if(this.config.scale) {
|
if(this.config.scale) {
|
||||||
switch(this.config.units) {
|
switch(this.config.units) {
|
||||||
case "metric":
|
case "metric":
|
||||||
degreeLabel = " °C";
|
degreeLabel += "C";
|
||||||
break;
|
break;
|
||||||
case "imperial":
|
case "imperial":
|
||||||
degreeLabel = " °F";
|
degreeLabel += "F";
|
||||||
break;
|
break;
|
||||||
case "default":
|
case "default":
|
||||||
degreeLabel = " K";
|
degreeLabel = "K";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user