Class EventHandler

Accessors

  • get exclusiveInteractionId(): undefined | string
  • if an exclusive Interaction is set, this will return the id of the exclusive Interaction This can be used to add another Interaction to the same Id

    Returns undefined | string

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

    • Optionalindex: 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.

    • Optionalid: 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
      • Returns void

  • 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
    • Optionalindex: 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
      • Returns number

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

    Returns void

Properties

clickDuration: number
dragDuration: number
exclusiveAdded: VcsEvent<void>
exclusiveRemoved: VcsEvent<void>