Function: toggleBoundaryGroup()
toggleBoundaryGroup(
spec,group,visible):VisualizationSpec
Defined in: spec/boundaryGroup.ts:126
Sets the visible flag on every layer in spec whose id matches any
layer ID in group.
When visible is true the property is omitted (default-visible).
When visible is false the property is explicitly set to false.
Layers not belonging to the group are left untouched. Returns a new spec object — the original is not mutated.
Parameters
| Parameter | Type | Description |
|---|---|---|
spec | VisualizationSpec | The spec containing the layers to toggle. |
group | BoundaryGroup | The boundary group whose layers should be toggled. |
visible | boolean | true to show (omit visible property), false to hide. |
Returns
A new spec with the updated visibility flags.