Class Bindings<H>Abstract

A contextual object for creating binders and thus bindings. allows the observation of the created bindings. Provides an undo/redo history. Why a pure abstract class and not an interface? Because interfaces are not retained at runtime in TS and we want DI (that thus cannot inject interface types).

Type Parameters

Hierarchy

Constructors

Properties

logger: Logger
undoHistory: H

The undo/redo history of the current binding context

Methods

  • Clears all the data of this binding context: the possible current BindingsObserver object; the undo/redo history.

    Returns void

  • Creates a binding that uses the LongMouseDown (mouse button pressed for a certain amount of time) interaction.

    Type Parameters

    • A

    Parameters

    • duration: number

      The duration of the pressure to end the user interaction. If this duration is not reached, the interaction is cancelled.

    • Optional accInit: A

    Returns PartialUpdatePointTypedBinder<A>

  • Creates a binding that uses the long touch interaction.

    Type Parameters

    • A

    Parameters

    • duration: number

      The duration of the touch to end the user interaction. If this duration is not reached, the interaction is cancelled.

    • Optional accInit: A

    Returns PartialTouchTypedBinder<A>

  • Creates a binding that uses the MouseEnter (mouse cursor enters the element) interaction.

    Type Parameters

    • A

    Parameters

    • withBubbling: boolean

      True: event bubbling is enabled and events on child elements will be registered

    • Optional accInit: A

    Returns PartialPointTypedBinder<A>

  • Creates a binding that uses the MouseLeave (mouse cursor leaves the element) interaction.

    Type Parameters

    • A

    Parameters

    • withBubbling: boolean

      True: event bubbling is enabled and events on child elements will be registered

    • Optional accInit: A

    Returns PartialPointTypedBinder<A>

  • Creates a binding that uses the multi-touch user interaction.

    Type Parameters

    • A

    Parameters

    • nbTouches: number

      The number of required touches. A multi-touch starts when all its touches have started. A multi-touch ends when the number of required touches is greater than the number of touches.

    • Optional accInit: A

    Returns PartialMultiTouchTypedBinder<A>

  • Creates a binding that uses a bottom pan interaction (or swipe if minVelocity is used) interaction (one-touch).

    Type Parameters

    • A

    Parameters

    • pxTolerance: number

      The tolerance rate in pixels accepted while executing the pan

    • cancellable: boolean

      Whether the DnD can be cancelled by interacting with a dwell-and-spring element.

    • Optional minLength: number

      The minimal distance from the starting point to the release point for validating the pan

    • Optional minVelocity: number

      The pan while be a swipe: the minimal minVelocity to reach for validating the swipe. In pixels per second.

    • Optional accInit: A

    Returns PartialTouchSrcTgtTypedBinder<A>

  • Creates a binding that uses a vertical pan interaction (or swipe if minVelocity is used) interaction (one-touch).

    Type Parameters

    • A

    Parameters

    • pxTolerance: number

      The tolerance rate in pixels accepted while executing the pan

    • cancellable: boolean

      Whether the DnD can be cancelled by interacting with a dwell-and-spring element.

    • Optional minLength: number

      The minimal distance from the starting point to the release point for validating the pan

    • Optional minVelocity: number

      The pan while be a swipe: the minimal minVelocity to reach for validating the swipe. In pixels per second.

    • Optional accInit: A

    Returns PartialTouchSrcTgtTypedBinder<A>

  • Creates a binding that uses a left pan interaction (or swipe if minVelocity is used) interaction (one-touch).

    Type Parameters

    • A

    Parameters

    • pxTolerance: number

      The tolerance rate in pixels accepted while executing the pan

    • cancellable: boolean

      Whether the DnD can be cancelled by interacting with a dwell-and-spring element.

    • Optional minLength: number

      The minimal distance from the starting point to the release point for validating the pan

    • Optional minVelocity: number

      The pan while be a swipe: the minimal minVelocity to reach for validating the swipe. In pixels per second.

    • Optional accInit: A

    Returns PartialTouchSrcTgtTypedBinder<A>

  • Creates a binding that uses a right pan interaction (or swipe if minVelocity is used) interaction (one-touch).

    Type Parameters

    • A

    Parameters

    • pxTolerance: number

      The tolerance rate in pixels accepted while executing the pan

    • cancellable: boolean

      Whether the DnD can be cancelled by interacting with a dwell-and-spring element.

    • Optional minLength: number

      The minimal distance from the starting point to the release point for validating the pan

    • Optional minVelocity: number

      The pan while be a swipe: the minimal minVelocity to reach for validating the swipe. In pixels per second.

    • Optional accInit: A

    Returns PartialTouchSrcTgtTypedBinder<A>

  • Creates a binding that uses a top pan interaction (or swipe if minVelocity is used) interaction (one-touch).

    Type Parameters

    • A

    Parameters

    • pxTolerance: number

      The tolerance rate in pixels accepted while executing the pan

    • cancellable: boolean

      Whether the DnD can be cancelled by interacting with a dwell-and-spring element.

    • Optional minLength: number

      The minimal distance from the starting point to the release point for validating the pan

    • Optional minVelocity: number

      The pan while be a swipe: the minimal minVelocity to reach for validating the swipe. In pixels per second.

    • Optional accInit: A

    Returns PartialTouchSrcTgtTypedBinder<A>

  • Creates a binding that uses a vertical pan (or swipe if minVelocity is used) interaction (one-touch).

    Type Parameters

    • A

    Parameters

    • pxTolerance: number

      The tolerance rate in pixels accepted while executing the pan

    • cancellable: boolean

      Whether the DnD can be cancelled by interacting with a dwell-and-spring element.

    • Optional minLength: number

      The minimal distance from the starting point to the release point for validating the pan

    • Optional minVelocity: number

      The pan while be a swipe: the minimal minVelocity to reach for validating the swipe. In pixels per second.

    • Optional accInit: A

    Returns PartialTouchSrcTgtTypedBinder<A>

  • Creates a binding that uses the Reciprocal DnD interaction. A spring handle can be pressed on a long click to return the element back to its previous position.

    Type Parameters

    • A

    Parameters

    • handle: EltRef<SVGCircleElement>

      The selectable part of the spring widget.

    • spring: EltRef<SVGLineElement>

      The line between the handle and the previous position of the element.

    • Optional accInit: A

    Returns PartialPointSrcTgtTypedBinder<A>

  • Creates a binding that uses the Reciprocal DnD interaction with a touch. A spring handle can be pressed on a long click to return the element back to its previous position.

    Type Parameters

    • A

    Parameters

    • handle: EltRef<SVGCircleElement>

      The selectable part of the spring widget.

    • spring: EltRef<SVGLineElement>

      The line between the handle and the previous position of the element.

    • Optional accInit: A

    Returns PartialTouchSrcTgtTypedBinder<A>

  • Creates a binding that uses the rotate interaction (two-touch interaction, with the first point that must remain static).

    Type Parameters

    • A

    Parameters

    • pxTolerance: number

      The tolerance rate in pixels accepted while executing the rotation (i.e. the acceptance rate when moving the fixation/first point).

    • Optional accInit: A

    Returns PartialRotateTypedBinder<A>

  • Sets the current BindingsObserver object. Cleans the potential former global BindingsObserver object.

    Parameters

    • Optional obs: BindingsObserver

      The new BindingsObserver object to consider. Can be undefined.

    Returns void

  • Creates a binding that uses a text interaction. This binder takes as argument a timeout value: using this text writing interaction, a user can write a sequence of letters and then stops for more than x milliseconds (x is the value of timeout). After this delay the binding executes the command. This is a mainstream optimisation that many text processing tools implement to limit the number of editing actions.

    Type Parameters

    • A

    Parameters

    • Optional timeout: number

      The timeout in milliseconds after which the interaction stops and the command produced.

    • Optional accInit: A

    Returns PartialTextInputTypedBinder<A>

  • Creates a binding that uses a bottom pan interaction (two-touch).

    Type Parameters

    • A

    Parameters

    • pxTolerance: number

      The tolerance rate in pixels accepted while executing the pan

    • Optional minLength: number

      The minimal distance from the starting point to the release point for validating the pan

    • Optional minVelocity: number

      The pan while be a swipe: the minimal minVelocity to reach for validating the swipe. In pixels per second.

    • Optional accInit: A

    Returns PartialTwoPanTypedBinder<A>

  • Creates a binding that uses a vertical pan interaction (two-touch).

    Type Parameters

    • A

    Parameters

    • pxTolerance: number

      The tolerance rate in pixels accepted while executing the pan

    • Optional minLength: number

      The minimal distance from the starting point to the release point for validating the pan

    • Optional minVelocity: number

      The pan while be a swipe: the minimal minVelocity to reach for validating the swipe. In pixels per second.

    • Optional accInit: A

    Returns PartialTwoPanTypedBinder<A>

  • Creates a binding that uses a left pan interaction (two-touch).

    Type Parameters

    • A

    Parameters

    • pxTolerance: number

      The tolerance rate in pixels accepted while executing the pan

    • Optional minLength: number

      The minimal distance from the starting point to the release point for validating the pan

    • Optional minVelocity: number

      The pan while be a swipe: the minimal minVelocity to reach for validating the swipe. In pixels per second.

    • Optional accInit: A

    Returns PartialTwoPanTypedBinder<A>

  • Creates a binding that uses a right pan interaction (two-touch).

    Type Parameters

    • A

    Parameters

    • pxTolerance: number

      The tolerance rate in pixels accepted while executing the pan

    • Optional minLength: number

      The minimal distance from the starting point to the release point for validating the pan

    • Optional minVelocity: number

      The pan while be a swipe: the minimal minVelocity to reach for validating the swipe. In pixels per second.

    • Optional accInit: A

    Returns PartialTwoPanTypedBinder<A>

  • Creates a binding that uses a top pan interaction (two-touch).

    Type Parameters

    • A

    Parameters

    • pxTolerance: number

      The tolerance rate in pixels accepted while executing the pan

    • Optional minLength: number

      The minimal distance from the starting point to the release point for validating the pan

    • Optional minVelocity: number

      The pan while be a swipe: the minimal minVelocity to reach for validating the swipe. In pixels per second.

    • Optional accInit: A

    Returns PartialTwoPanTypedBinder<A>

  • Creates a binding that uses a vertical pan interaction (two-touch).

    Type Parameters

    • A

    Parameters

    • pxTolerance: number

      The tolerance rate in pixels accepted while executing the pan

    • Optional minLength: number

      The minimal distance from the starting point to the release point for validating the pan

    • Optional minVelocity: number

      The pan while be a swipe: the minimal minVelocity to reach for validating the swipe. In pixels per second.

    • Optional accInit: A

    Returns PartialTwoPanTypedBinder<A>

Generated using TypeDoc