@geogirafe/lib-geoportal
    Preparing search index...

    Manages user interactions (mouse and keyboard events) by registering and unregistering listeners with the state. The manager provides proper handling of user interaction events by reassigning events to the active tool, providing logic for exclusive listeners, and reverting back to defaults when tools are closed.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Determines whether a listener associated with a specific event and tool can execute.

      Parameters

      • eventName: GgUserInteractionEvent

        The name of the interaction event.

      • toolName: string

        The name of the tool associated with the event.

      Returns boolean

      Returns true if the listener can execute; otherwise, returns false.

    • Registers a listener for the specified interaction event. If the listener is exclusive, it removes pre-existing exclusive listeners for the same event before registering the new one. Ensures that duplicate listeners are not registered.

      Parameters

      • eventName: GgUserInteractionEvent

        The event name to register the listener for.

      • isExclusive: boolean

        Indicates whether the listener is exclusive to the event. Exclusive listeners override other listeners for the same event.

      • toolName: string

        The name of the tool registering the listener.

      Returns boolean

      Returns true if the listener was successfully registered, false if the listener was already registered.

    • Unregisters all listeners associated with a specific tool.

      Parameters

      • toolName: string

        The name of the tool for which all event listeners should be unregistered.

      Returns void