TomTom Maps for JavaScript
    Preparing search index...

    Type Alias CleanEventStatesOptions

    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 features
    const cleanAll: CleanEventStatesOptions = {};

    // Remove only click states
    const cleanClicks: CleanEventStatesOptions = {
    states: ['click']
    };

    // Remove hover states without rendering
    const cleanHovers: CleanEventStatesOptions = {
    states: ['hover', 'long-hover'],
    show: false
    };
    type CleanEventStatesOptions = {
        show?: boolean;
        states?: EventType[];
    }
    Index

    Properties

    Properties

    show?: boolean

    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
    
    states?: EventType[]

    The event states to clean.

    If not supplied, all event states will be cleaned from all features.

    // Clean only click states
    states: ['click']

    // Clean all hover-related states
    states: ['hover', 'long-hover']

    // Clean everything (same as omitting)
    states: ['click', 'contextmenu', 'hover', 'long-hover']