Skip to content

Documentation / @ripl/core / resolveInteraction

Function: resolveInteraction() ​

resolveInteraction(option, fallback): ResolvedInteraction

Defined in: packages/core/src/core/navigator.ts:118

Resolves a NavigatorInteractionOption to concrete values, defaulting a sensitivity that was not given to 1.

An omitted option takes fallback, which is how a container's blanket interactions: false reaches an interaction that says nothing for itself. An option given as an object is enabled unless it says enabled: false, so { sensitivity: 2 } turns the interaction on.

Parameters ​

ParameterTypeDescription
optionNavigatorInteractionOption | undefinedThe option to resolve, or undefined where none was given.
fallbackbooleanWhether the interaction is enabled when no option was given.

Returns ​

ResolvedInteraction

The resolved enabled flag and sensitivity multiplier.