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);
interface InteractionAPI {
    getInteractionMode(): InteractionMode;
    isColorComparisonActive(): boolean;
    processInteractionInput(interactionData: InteractionData): void;
    resetInteractionMode(keepColorCompareActive?: boolean): void;
    setInteractionMode(
        mode: string | string[],
        keepColorCompareActive?: boolean,
    ): void;
    setInteractionMode(
        mode: InteractionMode,
        keepColorCompareActive?: boolean,
    ): void;
}

Hierarchy (View Summary)

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

    Returns void

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

    Parameters

    • OptionalkeepColorCompareActive: boolean

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

    Returns void

  • Set the current interaction mode.

    Parameters

    • mode: string | string[]

      Specifies the interaction mode you want set.

    • OptionalkeepColorCompareActive: boolean

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

    Returns void

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

  • Set the current interaction mode.

    Parameters

    • mode: InteractionMode

      Specifies the interaction mode you want set.

    • OptionalkeepColorCompareActive: boolean

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

    Returns void


Did you find this page useful? Please give it a rating:
Thank you for rating this page!
Any issues or feedback?
What kind of problem would you like to report?
Please tell us more about what's wrong: