Warning

Nightly releases are generated automatically from the latest source code and are intended for experimental purposes only. These builds may contain incomplete or untested features, bugs, or security vulnerabilities, and as such, are not for production use. Users should be aware that nightly releases may cause unexpected behavior, data loss, or system instability. Use of these releases is at the user's own risk, and it is advised to have adequate backups before testing. The software is provided as is with no guarantees or support.

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