fix: refine earth settings modal and hud interactions

This commit is contained in:
linkong
2026-04-10 16:37:09 +08:00
committed by rayd1o
parent a2210f0f78
commit e85a9fc614
4 changed files with 528 additions and 10 deletions

View File

@@ -49,6 +49,9 @@ function renderLegend(mode) {
const config = LEGEND_MODES[mode] || LEGEND_MODES.cables;
const items = legendItemsByMode[mode] || [];
const titleEl = legend.querySelector(".legend-title");
const listEl = legend.querySelector(".legend-list");
if (!titleEl || !listEl) return;
const itemsHtml = items
.map(
(item) => `
@@ -60,8 +63,6 @@ function renderLegend(mode) {
)
.join("");
legend.innerHTML = `
<h3 class="legend-title hud-panel-title">${config.title}</h3>
<div class="legend-list">${itemsHtml}</div>
`;
titleEl.textContent = config.title;
listEl.innerHTML = itemsHtml;
}