Update app.js

Layout tweak. Make number of spaces dependent on length of locale speedUnits variable.
master
lunctis-viribus 2021-12-08 12:08:41 +01:00 committed by GitHub
parent f1bacffca6
commit 1e733d4378
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ function draw() {
clockLayout.tempUnit.label = temp[2];
clockLayout.weatherIcon.src = chooseIcon(currentWeather.txt);
const wind = locale.speed(currentWeather.wind).match(/^(\D*\d*)(.*)$/);
clockLayout.wind.label = wind[1] + " ";
clockLayout.wind.label = wind[1] + " ".repeat(wind[2].length-1);
clockLayout.windUnit.label = wind[2] + " " + (currentWeather.wrose||'').toUpperCase();
}
else{