Class EventHandler

Hierarchy

  • EventHandler

Accessors

Constructors

Methods

  • Add a dynamic interaction to the interaction chain. This is the default methodology for user map interactions, such as drawing or measuring. If another exclusive interaction is added, this interaction is removed and a provided callback is called. Use the id parameter to add multiple interactions from the same source (if you don't wish to provide an InteractionChain)

    Parameters

    • interaction: AbstractInteraction
    • removed: (() => void)

      the callback for when the interaction is forcefully removed.

        • (): void
        • Returns void

    • Optional index: number

      the position at which to push the interaction. If no index is provided, the interaction is pushed at the end and therefore is executed last.

    • Optional id: string

      an id to allow for multiple interactions to belong to the same exclusive registerer

    Returns (() => void)

    function to remove the interaction with. returns number of removed interactions (0|1)

      • (): void
      • Add a dynamic interaction to the interaction chain. This is the default methodology for user map interactions, such as drawing or measuring. If another exclusive interaction is added, this interaction is removed and a provided callback is called. Use the id parameter to add multiple interactions from the same source (if you don't wish to provide an InteractionChain)

        Returns void

        function to remove the interaction with. returns number of removed interactions (0|1)

  • Adds an interaction permanently to the interaction chain. Only add non-interferring interactions in such a fashion (for instance for displaying the cursor position)

    Parameters

    • interaction: AbstractInteraction
    • Optional index: number = 3

      at what position this interaction should be added. By default, it is added after the featureProviderInteraction

    Returns (() => number)

    function to remove the interaction with. returns number of removed interactions (0|1)

      • (): number
      • Adds an interaction permanently to the interaction chain. Only add non-interferring interactions in such a fashion (for instance for displaying the cursor position)

        Returns number

        function to remove the interaction with. returns number of removed interactions (0|1)

  • Removes any exclusive listeners. Typically only called from the framework to ensure the pubsub listeners are consistent

    Returns void

Properties

_boundKeyListener: ((e) => void)

Type declaration

    • (e): void
    • Parameters

      • e: KeyboardEvent

      Returns void

_dragging: null | MapEvent
_eventQueue: InteractionEvent[]
_exclusiveInteraction: null | EventHandlerExclusiveInteraction
_featureInteraction: FeatureAtPixelInteraction
_featureProviderInteraction: FeatureProviderInteraction
_interactionChain: InteractionChain
_lastClick: LastClick
_lastDispatchedModifier: ModificationKeyType
_lastDown: null | MapEvent
_lastKeyEventModifiers: Map<ModificationKeyType, boolean>
_modifierChanged: VcsEvent<ModificationKeyType>
_multiples: boolean
_positionInteraction: CoordinateAtPixel
_running: boolean
clickDuration: number
dragDuration: number
exclusiveAdded: VcsEvent<void>
exclusiveRemoved: VcsEvent<void>

Generated using TypeDoc