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':
|
||||
properties['maxspeed'] = f"{value} mph" if value is not None else None
|
||||
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'
|
||||
elif value.startswith('PRIMARY'):
|
||||
elif value_str.startswith('PRIMARY'):
|
||||
properties['highway'] = 'trunk'
|
||||
elif value.startswith('MAJOR'):
|
||||
elif value_str.startswith('MAJOR'):
|
||||
properties['highway'] = 'primary'
|
||||
else:
|
||||
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
|
||||
map.on('click', function() {
|
||||
map.on('click', function(e) {
|
||||
if (multiSelectMode) return;
|
||||
if (e.originalEvent && e.originalEvent.shiftKey) return;
|
||||
clearSelection();
|
||||
});
|
||||
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
.then(r => r.json())
|
||||
.then(data => {
|
||||
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'));
|
||||
}
|
||||
|
||||
@@ -275,10 +275,31 @@
|
||||
.leaflet-container.multi-select-active.leaflet-grab {
|
||||
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>
|
||||
</head>
|
||||
<body>
|
||||
<div id="map"></div>
|
||||
<a href="/" class="back-button">← Back</a>
|
||||
|
||||
<!-- Hamburger menu button for mobile -->
|
||||
<button class="hamburger-button" id="hamburgerButton" aria-label="Toggle menu">
|
||||
|
||||
Reference in New Issue
Block a user