auto-sync: 2026-05-05 20:30:01
This commit is contained in:
7
tasks/enduro-trails/prototype/static/app.js
vendored
7
tasks/enduro-trails/prototype/static/app.js
vendored
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user