InteractionAPI¶
Interface InteractionAPI
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;
}
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)
- InteractionAPI
Methods
get Interaction Mode
is Color Comparison Active
Checks if the color comparison mode is active.
Returns boolean
true if the color comparison mode is active, otherwise false.
process Interaction Input
Triggers an interaction on the current active interaction mode.
Parameters
- interactionData: InteractionData
Definition of the triggered Interaction.
Returns void
- interactionData: InteractionData
reset Interaction Mode
Sets the current interaction mode back to the Default mode.
Parameters
OptionalkeepColorCompareActive: booleanSpecifies if the color comparison mode should stay active. (Default: false)
Returns void
set Interaction Mode
Set the current interaction mode.
Parameters
- mode: string | string[]
Specifies the interaction mode you want set.
OptionalkeepColorCompareActive: booleanSpecifies if the color comparison mode should stay active. Default: false
Returns void
- mode: string | string[]
Set the current interaction mode.
Parameters
- mode: InteractionMode
Specifies the interaction mode you want set.
OptionalkeepColorCompareActive: booleanSpecifies if the color comparison mode should stay active. Default: false
Returns void
- mode: InteractionMode
Was this page helpful? Please leave a thumbs up or down.
InteractionAPI
Overview
The InteractionAPI provides functionalities to control the current interaction behavior by switching between different predefined interaction modes interaction modes.
Quick Start
Example
Events
The InteractionAPI emits the following events: