Add a heatmap spot size slider to the Active Fires row

A ½×–4× slider (log2 axis, 5 % steps, default 1×) under the intensity
filter sets how large far-zoom heat spots are. It scales the grid, not
the blur: 2× is a 1024 × 512 grid with the same one-pixel blur, so each
spot grows exactly and weak lone fires don't fade as they widen. A change
rebuilds only the heatmap. Share links keep it as w.s (percent, 50–400).
The layer row now takes a list of sliders.
This commit is contained in:
German Khokhlov committed 2026-11-03 14:56:40 +04:00
1 parent ef5c034dc9
commit 3139369673
26 files changed
+449 -91

No files matched your search

+8 -11
View File
@@ -430,7 +430,7 @@ export class LayerPanel {
}
/**
* A layer's row chips, one-of-many switch, slider, color legend, info line
* A layer's row chips, one-of-many switch, sliders, color legend, info line
* and ordered list. The block
* is hidden while the layer is off (or while a dependency owner has
* surrendered it), so a quiet row stays quiet. Chips and list items are
@@ -456,7 +456,7 @@ export class LayerPanel {
}));
const infoText = controls?.info ? String(controls.info) : '';
const segmented = controls?.segmented || null;
const slider = controls?.slider || null;
const sliders = Array.isArray(controls?.sliders) ? controls.sliders : [];
// The info line, once shown, stays in place and hides when empty.
if (infoText) row.info = true;
return {
@@ -465,10 +465,10 @@ export class LayerPanel {
legend.length === 0 &&
!infoText &&
!segmented &&
!slider,
sliders.length === 0,
chips,
segmented,
slider,
sliders,
legend,
info: row.info
? { text: infoText, title: controls?.infoTitle || '' }
@@ -522,13 +522,10 @@ export class LayerPanel {
// to params through the live descriptor on every tick.
_moveSlider(id, sliderId, value, generation = this._generation) {
if (this._destroyed || this._generation !== generation) return;
const slider = this._rowControlsFor(id)?.slider;
if (
!slider ||
slider.id !== sliderId ||
typeof slider.params !== 'function' ||
!this.isEnabled(id)
)
const slider = this._rowControlsFor(id)?.sliders?.find(
(entry) => entry.id === sliderId,
);
if (!slider || typeof slider.params !== 'function' || !this.isEnabled(id))
return;
this.setLayerParams(id, slider.params(value), { origin: 'user' });
}