Interface SrcTgtPointsData<T>

Interaction data for a single pointing device that moves from a source position to a target position.

interface SrcTgtPointsData {
    diffClientX: number;
    diffClientY: number;
    diffPageX: number;
    diffPageY: number;
    diffScreenX: number;
    diffScreenY: number;
    duration: number;
    src: T;
    tgt: T;
    isBottom(pxTolerance): boolean;
    isHorizontal(pxTolerance): boolean;
    isLeft(pxTolerance): boolean;
    isRight(pxTolerance): boolean;
    isTop(pxTolerance): boolean;
    isVertical(pxTolerance): boolean;
    velocity(direction): number;
}

Type Parameters

Hierarchy

Implemented by

Properties

diffClientX: number

The translation vector between the x client position of the source and the y client position of the target.

diffClientY: number

The translation vector between the y client position of the source and the y client position of the target.

diffPageX: number

The translation vector between the x page position of the source and the x page position of the target.

diffPageY: number

The translation vector between the y page position of the source and the y page position of the target.

diffScreenX: number

The translation vector between the x screen position of the source and the x screen position of the target.

diffScreenY: number

The translation vector between the y screen position of the source and the y screen position of the target.

duration: number

The duration of the move, in milliseconds.

src: T

The source point data.

tgt: T

The target point data. At the beginning of the interaction, the target data have the same values as the source data.

Methods

  • Returns true if the gesture is going to the bottom.

    Parameters

    • pxTolerance: number

      The pixel tolerance for considering the line vertical.

    Returns boolean

  • Returns true if the line between the two points is relatively horizontal.

    Parameters

    • pxTolerance: number

      The pixel tolerance for considering the line horizontal.

    Returns boolean

  • Returns true if the gesture is going to the left.

    Parameters

    • pxTolerance: number

      The pixel tolerance for considering the line horizontal.

    Returns boolean

  • Returns true if the gesture is going to the right.

    Parameters

    • pxTolerance: number

      The pixel tolerance for considering the line horizontal.

    Returns boolean

  • Returns true if the gesture is going to the top.

    Parameters

    • pxTolerance: number

      The pixel tolerance for considering the line vertical.

    Returns boolean

  • Returns true if the line between the two points is relatively vertical.

    Parameters

    • pxTolerance: number

      The pixel tolerance for considering the line vertical.

    Returns boolean

  • The velocity of the move, in pixels per millisecond.

    Parameters

    • direction: "all" | "horiz" | "vert"

      The direciton to consider.

    Returns number

Generated using TypeDoc