auto-sync: 2026-05-05 20:30:01

This commit is contained in:
Stream
2026-05-05 20:30:01 +03:00
parent 184253fa53
commit 5a0ad721e4

View File

@@ -450,6 +450,12 @@ function clearRoute() {
function addWaypointMode() {
if (routeWaypoints.length >= 10) return;
// Убедиться что routeMode активен — иначе клик на карте игнорируется
if (!routeMode) {
routeMode = true;
document.getElementById('tb-route').classList.add('active');
updateMapModeClass();
}
addingWaypoint = true;
window._map.getCanvas().style.cursor = 'crosshair';
document.getElementById('route-status').textContent = 'Тапни на карте для добавления точки';
@@ -673,6 +679,7 @@ function _initWaypointDragHandles(list) {
list.addEventListener('mousedown', (e) => {
const handle = e.target.closest('.wl-drag-handle');
if (!handle) return;
if (e.target.closest('.wl-add')) return; // не перехватывать кнопку добавления
e.preventDefault();
startDrag(e.clientY, parseInt(handle.dataset.idx, 10));
document.addEventListener('mousemove', _onDragMouse);