Constructor
new CategoricalSwatchView()
- Since:
- Source:
Extends
Members
className
- Source:
The model that this view uses
Type:
- Source:
template
- Source:
Methods
events() → {object}
A function that gives the events this view will listen to and the associated
function to call.
- Source:
Returns:
Returns an object with events in the format 'event selector':
'function'
-
Type
-
object
initialize()
- Source:
onLegendItemClick()
Handles click events on legend swatch items.
This function toggles the selection state of a legend item's value in the filter model:
- If the clicked value is already selected, it removes it from the filter model.
- If the clicked value is not selected, it adds it to the filter model.
- Adjusts the opacity of the legend item's swatch and label to visually reflect its selection state.
- Source:
render()
- Source:
showFilterStatus()
Apply the correct opacity styling based on filterActive state.
- When filterActive is true, opacity = 0.25 (transparent).
- When filterActive is false, opacity = 1 (fully visible).
- Source: