Parameters to clean event states for a collection of shown features.
Bulk operation for removing event states from multiple features at once. More efficient than cleaning features individually.
// Remove all event states from all featuresconst cleanAll: CleanEventStatesOptions = {};// Remove only click statesconst cleanClicks: CleanEventStatesOptions = { states: ['click']};// Remove hover states without renderingconst cleanHovers: CleanEventStatesOptions = { states: ['hover', 'long-hover'], show: false}; Copy
// Remove all event states from all featuresconst cleanAll: CleanEventStatesOptions = {};// Remove only click statesconst cleanClicks: CleanEventStatesOptions = { states: ['click']};// Remove hover states without renderingconst cleanHovers: CleanEventStatesOptions = { states: ['hover', 'long-hover'], show: false};
Optional
Whether to show the feature after cleaning the event state.
Set to false only if you want to keep manipulating features before showing them, which can improve performance for batch updates.
true Copy
true
The event states to clean.
If not supplied, all event states will be cleaned from all features.
// Clean only click statesstates: ['click']// Clean all hover-related statesstates: ['hover', 'long-hover']// Clean everything (same as omitting)states: ['click', 'contextmenu', 'hover', 'long-hover'] Copy
// Clean only click statesstates: ['click']// Clean all hover-related statesstates: ['hover', 'long-hover']// Clean everything (same as omitting)states: ['click', 'contextmenu', 'hover', 'long-hover']
Parameters to clean event states for a collection of shown features.
Bulk operation for removing event states from multiple features at once. More efficient than cleaning features individually.
Example