This is the documentation of version 0.64.0. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Type Alias ClearEventStatesOptions

    Parameters to clear the event states of a collection of shown features.

    Bulk operation for removing event states from multiple features at once. More efficient than clearing features individually.

    // Remove all event states from all features
    const clearAll: ClearEventStatesOptions = {};

    // Remove only click states
    const clearClicks: ClearEventStatesOptions = {
    states: ['click']
    };

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

    Whether to show the feature after clearing 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?: EventState[]

    The event states to clear.

    If not supplied, all event states are cleared from all features.

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

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

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