/ui/layers/legends/utils
The categorized theme legend module exports the categorizedTheme to the ui.layers.legend{} library object.
Dictionary entries:
- layer_style_switch_caption
- layer_style_switch_all
- layer_style_cluster
Requires
Methods
(inner) catToggle(e, layer, cat)
The method toggles the disabled class on the event target element.
If toggled [on] the filterAdd method will be called and the style will be set to null.
If toggled [off] the filterRemove method will be called and the style will be restored from the cat._style.
| Name | Type | Description |
|---|---|---|
e | Event | The cat label click event. |
layer | layer | The decorated mapp layer. |
cat | object | The cat object from the theme. |
(inner) clusterLegend(layer)
Adds a cluster icon for the theme.
| Name | Type | Description |
|---|---|---|
layer | The layer the theme exists on. |
(inner) createLegend(cat, theme, layer)
Create legend entry for category within a theme.
| Name | Type | Description |
|---|---|---|
cat | Object | The category object. |
theme | Object | The theme configuration object. |
layer | Object | The layer object. |
(inner) distributedLegend(layer) → {HTMLElement}
This function hides the distribution count theme on load.
| Name | Type | Description |
|---|---|---|
layer | layer | The layer the theme exists on. |
The legend node
- Type:
- HTMLElement
(inner) filterAdd(layer, cat)
Add the cat value to the current filter.
| Name | Type | Description |
|---|---|---|
layer | layer | The decorated mapp layer. |
cat | object | The cat object from the theme. |
(inner) filterRemove(layer, cat)
Remove the cat value to the current filter.
| Name | Type | Description |
|---|---|---|
layer | layer | The decorated mapp layer. |
cat | object | The cat object from the theme. |
(inner) themeParser(layer)
Sets nullish assignment of values and classList properties on the theme.
| Name | Type | Description |
|---|---|---|
layer | The layer the theme exists on. |