Class XTouchDnD<T, S>

The X-touch represents any touch interaction that involve more than one touch. This class is usually used to build more complex touch interactions.

Type Parameters

Hierarchy

Constructors

  • Creates the interaction.

    Type Parameters

    Parameters

    • nbTouches: number

      The number of touches of the interaction

    • logger: Logger

      The logger to use for this interaction

    • dataImpl: S

      The interaction data instance to use.

    • Optional name: string

      The name of the user interaction

    • Optional fsm: MultiTouchFSM

      The optional FSM provided for the interaction

    • Optional movementRequired: boolean

      Whether the DnD starts after the touch point has begun moving (default) or as soon as the screen is touched. The latter is used for the MultiTouch interaction.

    Returns XTouchDnD<T, S>

Properties

_data: S

The interaction data

_dynamicRegisteredNodes: Set<unknown>
_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 registeredNodes(): ReadonlySet<unknown>
  • The registered nodes.

    Returns ReadonlySet<unknown>

  • 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

  • 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