Class TimedTap

A tap user interaction that has a timeout: while touching, if the timeout is reached the interaction is cancelled. This touch interaction takes as input the timeout (in ms) the number of taps expected to end the interaction. If this number is not reached after a timeout, the interaction is cancelled.

Hierarchy

Constructors

  • Creates the timed tap interaction

    Parameters

    • duration: number

      The max duration before a timeout while touching.

    • numberTaps: number

      The number of taps expected to end the interaction. If this number is not reached after a timeout, the interaction is cancelled.

    • logger: Logger

      The logger to use for this interaction

    • Optional name: string

      The name of the user interaction

    Returns TimedTap

Properties

The interaction data

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

The current nodes that the interaction works on

activated: boolean

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

currentThrottling: undefined | CancellablePromise
latestThrottledEvent: undefined | Event
logger: Logger
mutationObservers: MutationObserver[]

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

throttleTimeout: number

Accessors

  • get dynamicRegisteredNodes(): ReadonlySet<unknown>
  • The nodes for which the user interaction will register their child nodes dynamically.

    Returns ReadonlySet<unknown>

  • get preventDefault(): boolean
  • Returns boolean

    True if the default behavior associated to the event will be executed.

  • set preventDefault(prevent): void
  • Sets whether the default behavior associated to the event will be executed.

    Parameters

    • prevent: boolean

    Returns void

    Param: prevent

    True: the default behavior associated to the event will be ignored.

  • get stopImmediatePropagation(): boolean
  • Returns boolean

    True if the user interaction will stop immediately the propagation of events processed by this user interaction to others listeners.

  • set stopImmediatePropagation(stop): void
  • Sets whether the user interaction will stop immediately the propagation of events processed by this user interaction to others listeners.

    Parameters

    • stop: boolean

    Returns void

    Param: stop

    True: the propagation of the events will stop immediately.

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