Две стрелочки

This commit is contained in:
zakhy 2025-01-27 17:51:46 +07:00
parent 4186215daa
commit 44461573e3
3 changed files with 6 additions and 5 deletions

View File

@ -84,7 +84,7 @@
<div>Направление ветра</div>
<div><b><span class="meteo_wda"></span></b>
<i class="fa fa-arrow-up" style="color: var(--primary);" id="wda-dir"></i>
<i class="fa fa-arrow-up wda-dir" style="color: var(--primary);"></i>
</div>
<div>Скорость ветра</div>

View File

@ -18,7 +18,7 @@ INSTALLED_APPS = [
"""Информация о приложении """
SITE_TITLE = 'Система отчетов'
SITE_TITLE_S = 'СиО'
APP_VERSION = '1.0.10.3'
APP_VERSION = '1.0.10.4'
APP_VEK = '2024 г'
APP_COPPIRIGHT = 'Система отчетов'

View File

@ -198,6 +198,7 @@
</div>
<div>
Направление ветра: <b><span class="meteo_wda"></span></b>
<i class="fa fa-arrow-up wda-dir" style="color: var(--primary);"></i>
</div>
<div>
Скорость ветра: <b><span class="meteo_wva"></span> м/c</b>
@ -360,9 +361,9 @@
const elements = document.querySelectorAll(`.meteo_${item}`)
for (let element of elements) {
if (item === "wda") {
const arrow = document.querySelector('#wda-dir')
if (arrow) {
arrow.style.transform = `rotate(${json[item]}deg)`
const arrows = document.querySelectorAll('.wda-dir')
for (let arrow of arrows) {
arrow.style.transform = `rotate(${json[item]}deg)`
}
element.textContent = `${getWindDirection(json[item])} ( ${parseFloat(json[item]).toFixed(2)}\u00B0 )`
continue