fix(wind): bound GFS acquisition and preserve canvas trails and lifecycle

This commit is contained in:
Bilawal Sidhu committed 2026-09-15 02:21:09 -05:00
1 parent 93d4224fdf
commit dcb3339070
17 files changed
+251 -101

No files matched your search

+10 -3
View File
@@ -226,11 +226,11 @@ export class LayerPanel {
const chips = controls?.chips || [];
const legend = controls?.legend || [];
this._syncRowList(listContainer, controls?.list || null);
container.hidden = chips.length === 0 && legend.length === 0;
container.hidden = chips.length === 0 && legend.length === 0 && !controls?.info;
for (const node of [...container.children]) {
if (
String(node.className).split(/\s+/).includes('data-toggle-legend-item')
String(node.className).split(/\s+/).some((name) => ['data-toggle-legend-item', 'data-toggle-controls-info'].includes(name))
)
node.remove();
}
@@ -267,10 +267,17 @@ export class LayerPanel {
swatch.className = 'data-toggle-legend-swatch';
swatch.style.background = item.color;
const text = document.createElement('span');
text.textContent = `${item.label} ${this._formatCount(item.count)}`;
text.textContent = item.count == null ? String(item.label) : `${item.label} ${this._formatCount(item.count)}`;
entry.append(swatch, text);
container.appendChild(entry);
}
if (controls?.info) {
const info = document.createElement('div');
info.className = 'data-toggle-controls-info';
info.textContent = String(controls.info);
if (controls.infoTitle) info.title = controls.infoTitle;
container.appendChild(info);
}
}
/**