fix: Sort sources alphabetically in UI for consistent display
Changed Sources list and dropdown to sort alphabetically by name instead of dynamically by last data arrival time. This provides a stable, predictable order that is less distracting during use. - Modified updateSourcesLegend() in map-manager.js to sort sources by name - Modified updateSourceFilter() in ui-manager.js to maintain consistent sorting - Sources now use localeCompare() for proper alphabetical ordering 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
978d1c0859
commit
57e63975db
2 changed files with 12 additions and 3 deletions
|
|
@ -199,7 +199,12 @@ export class MapManager {
|
|||
|
||||
legend.innerHTML = '';
|
||||
|
||||
for (const [id, source] of this.sourcesData) {
|
||||
// Sort sources alphabetically by name
|
||||
const sortedSources = Array.from(this.sourcesData.values()).sort((a, b) =>
|
||||
a.name.localeCompare(b.name)
|
||||
);
|
||||
|
||||
for (const source of sortedSources) {
|
||||
const item = document.createElement('div');
|
||||
item.className = 'legend-item';
|
||||
item.innerHTML = `
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue