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
get
- getInteractionMode(): InteractionMode
- Returns the current Interaction mode. - Returns InteractionMode- The current Interaction mode. 
is
process
- processInteractionInput(interactionData: InteractionData): void
- Triggers an interaction on the current active interaction mode. - Parameters- interactionData: InteractionDataDefinition of the triggered Interaction. 
 - Returns void
- interactionData: InteractionData
reset
set
- setInteractionMode(
 mode: string | string[],
 keepColorCompareActive?: boolean,
 ): 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
- mode: string | string[]
- setInteractionMode(
 mode: InteractionMode,
 keepColorCompareActive?: boolean,
 ): void
- Set the current interaction mode. - Parameters- mode: InteractionModeSpecifies the interaction mode you want set. 
- OptionalkeepColorCompareActive: boolean- Specifies if the color comparison mode should stay active. (Default: false) 
 - Returns void
- mode: InteractionMode
The InteractionAPI provides functionalities to control the current interaction behavior by switching between different predefined interaction modes.
Example