Fix multiselect popup, map back button, RoadClass float crash
This commit is contained in:
+4
-3
@@ -408,11 +408,12 @@ class RoadComparator:
|
|||||||
elif key == 'SpeedLimit':
|
elif key == 'SpeedLimit':
|
||||||
properties['maxspeed'] = f"{value} mph" if value is not None else None
|
properties['maxspeed'] = f"{value} mph" if value is not None else None
|
||||||
elif key == 'RoadClass':
|
elif key == 'RoadClass':
|
||||||
if value is None:
|
value_str = str(value) if value is not None else None
|
||||||
|
if value_str is None:
|
||||||
properties['highway'] = 'residential'
|
properties['highway'] = 'residential'
|
||||||
elif value.startswith('PRIMARY'):
|
elif value_str.startswith('PRIMARY'):
|
||||||
properties['highway'] = 'trunk'
|
properties['highway'] = 'trunk'
|
||||||
elif value.startswith('MAJOR'):
|
elif value_str.startswith('MAJOR'):
|
||||||
properties['highway'] = 'primary'
|
properties['highway'] = 'primary'
|
||||||
else:
|
else:
|
||||||
properties['highway'] = 'residential'
|
properties['highway'] = 'residential'
|
||||||
|
|||||||
+3
-1
@@ -1220,7 +1220,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Click on empty map area closes any open popup and clears selection
|
// Click on empty map area closes any open popup and clears selection
|
||||||
map.on('click', function() {
|
map.on('click', function(e) {
|
||||||
|
if (multiSelectMode) return;
|
||||||
|
if (e.originalEvent && e.originalEvent.shiftKey) return;
|
||||||
clearSelection();
|
clearSelection();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -333,7 +333,7 @@
|
|||||||
.then(r => r.json())
|
.then(r => r.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (data.error) showStatus(`Error: ${data.error}`, 'error');
|
if (data.error) showStatus(`Error: ${data.error}`, 'error');
|
||||||
else showStatus('Saved. Restart the server to apply changes to the workflow.', 'success');
|
else showStatus('Saved successfully.', 'success');
|
||||||
})
|
})
|
||||||
.catch(err => showStatus(`Error: ${err.message}`, 'error'));
|
.catch(err => showStatus(`Error: ${err.message}`, 'error'));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,10 +275,31 @@
|
|||||||
.leaflet-container.multi-select-active.leaflet-grab {
|
.leaflet-container.multi-select-active.leaflet-grab {
|
||||||
cursor: crosshair !important;
|
cursor: crosshair !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Back button */
|
||||||
|
.back-button {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
left: 10px;
|
||||||
|
z-index: 1000;
|
||||||
|
padding: 6px 12px;
|
||||||
|
background: #1a1a2e;
|
||||||
|
color: #ddd;
|
||||||
|
border: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
box-shadow: 0 2px 6px rgba(0,0,0,0.3);
|
||||||
|
}
|
||||||
|
.back-button:hover { background: #2d2d4e; color: #fff; }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
|
<a href="/" class="back-button">← Back</a>
|
||||||
|
|
||||||
<!-- Hamburger menu button for mobile -->
|
<!-- Hamburger menu button for mobile -->
|
||||||
<button class="hamburger-button" id="hamburgerButton" aria-label="Toggle menu">
|
<button class="hamburger-button" id="hamburgerButton" aria-label="Toggle menu">
|
||||||
|
|||||||
Reference in New Issue
Block a user