Files
enduro-trails/docs/work-items/ET-005/02-trz.md
Slava 2f2beb0447
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 4s
CI / build (push) Successful in 1s
docs(ET-005): TRZ
2026-05-21 22:05:21 +03:00

19 lines
1.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ТЗ: Переключение единиц измерения
## Функциональные требования
1. Кнопка-toggle в панели настроек карты (рядом с другими controls)
2. Два состояния: km (default) / mi
3. При переключении — пересчёт всех видимых расстояний
4. Сохранение выбора в localStorage (ключ: distance_unit)
5. При загрузке страницы — читать из localStorage
## Нефункциональные требования
- Пересчёт < 100ms
- Кнопка доступна на всех размерах экрана
- Не блокирует другие UI элементы
## Технический дизайн
- Новый модуль: src/web/static/js/units.js
- Коэффициент: 1 km = 0.621371 mi
- Event: custom event "unitchange" на document
- Все компоненты с расстояниями слушают "unitchange"