Skip to main content

Function: LayerListControls()

LayerListControls(): Element

Defined in: components/LayerListControls.tsx:20

Opt-in controls slot variant: one row per layer with a visibility checkbox and its legend id, reading spec.layers instead of config.controls.menus. Enable it via config.slots.controls = { component: LayerListControls }.

Toggling a checkbox calls onLayerVisibilityChange — delegated to the application, the same way onRepair/onVariableChange already are, since only the application can rebuild visualizationSpec with the layer's new visible value (SpecPatch's 'layer' target only supports paint properties, not arbitrary layer fields).

Returns

Element