InteractionAPI

Interface InteractionAPI

The InteractionAPI provides functionalities to control the current interaction behavior by switching between different predefined interaction modes.

Example

// Activate the predefined mode to perform a double measurement.
myContext.setInteractionMode(webvis.InteractionMode.MEASUREMENT_DOUBLE);

// Leave the double measurement mode and switch back to the default interaction behaviour.
myContext.setInteractionMode(webvis.InteractionMode.DEFAULT);

Hierarchy

Methods

  • Checks if the color comparison mode is active.

    Returns boolean

    true if the color comparison mode is active, otherwise false.

  • Triggers an interaction on the current active interaction mode.

    Parameters

    • interactionData: InteractionData

      Definition of the triggered Interaction.

    Returns void

  • Sets the current interaction mode back to the Default mode.

    Parameters

    • Optional keepColorCompareActive: boolean

      Specifies if the color comparison mode should stay active. (Default: false)

    Returns void

  • Set the current interaction mode.

    Deprecated

    Calling setInteractionMode with the mode parameter of type string or string[] is deprecated, please use the InteractionMode enum instead.

    Parameters

    • mode: string | string[]

      Specifies the interaction mode you want set.

    • Optional keepColorCompareActive: boolean

      Specifies if the color comparison mode should stay active. (Default: false)

    Returns void

  • Set the current interaction mode.

    Parameters

    • mode: InteractionMode

      Specifies the interaction mode you want set.

    • Optional keepColorCompareActive: boolean

      Specifies if the color comparison mode should stay active. (Default: false)

    Returns void