Class InteractionBase<D, DImpl, F>Abstract

The base implementation of a user interaction.

Type Parameters

Hierarchy

Implements

Constructors

Properties

_data: DImpl

The interaction data

_dynamicRegisteredNodes: Set<unknown>
_fsm: F
_log: boolean
_name: string
_registeredNodes: Set<unknown>

The current nodes that the interaction works on

actionHandler?: EventListener
activated: boolean

Defines if the interaction is activated or not. If not, the interaction will not change on events.

currentThrottling: undefined | CancellablePromise
disposable: Subscription
keyHandler?: ((e) => void)

Type declaration

    • (e): void
    • Parameters

      • e: KeyboardEvent

      Returns void

latestThrottledEvent: undefined | Event
logger: Logger
mouseHandler?: ((e) => void)

Type declaration

    • (e): void
    • Parameters

      • e: MouseEvent

      Returns void

mutationObservers: MutationObserver[]

The current list of mutation observers. Used for listening changes in node lists.

preventDef: boolean
stopImmediatePropag: boolean
throttleTimeout: number
touchHandler?: ((e) => void)

Type declaration

    • (e): void
    • Parameters

      • e: TouchEvent

      Returns void

uiHandler?: ((e) => void)

Type declaration

    • (e): void
    • Parameters

      • e: UIEvent

      Returns void

Accessors

Methods

  • Parameters

    Returns readonly ("input" | "auxclick" | "change" | "click" | "keydown" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "scroll" | "touchend" | "touchmove" | "touchstart" | "wheel")[]

  • Parameters

    Returns ReadonlySet<"input" | "auxclick" | "change" | "click" | "keydown" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "scroll" | "touchend" | "touchmove" | "touchstart" | "wheel">

  • Parameters

    • eventType: "input" | "auxclick" | "change" | "click" | "keydown" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "scroll" | "touchend" | "touchmove" | "touchstart" | "wheel"
    • node: unknown

    Returns void

  • Permits to listen any change in the content (ie children) of the given node. For all child nodes of the given node, this interaction subscribes to it. This is dynamic: on new child nodes, the interaction registers to them. On child removals, the interaction unregisters to them.

    Parameters

    • elementToObserve: Node

      The node which children will be observed by the interaction.

    Returns void

  • Sets whether the user interaction is activated. When not activated, a user interaction does not process input events any more.

    Parameters

    • activated: boolean

      True: the user interaction will be activated.

    Returns void

  • Parameters

    • eventType: "input" | "auxclick" | "change" | "click" | "keydown" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "scroll" | "touchend" | "touchmove" | "touchstart" | "wheel"
    • node: unknown

    Returns void

Generated using TypeDoc