@resee-movies/utilities - v1.1.0
    Preparing search index...

    Function detectSwipeEvent

    • Watches for "swipe" interactions with the target element.

      For the purposes of this function, a swipe is a relatively simple interaction which consists of two PointerEvent events - pointerdown followed by pointerup - whose screen positions differ.

      Since most gestures are not going to be perfectly horizontal or vertical, the X and Y axis deltas are compared, and the larger of the two is used as the axis of change.

      When the start and end points are identical, or the X and Y deltas are identical (a gesture was made at a perfect 45-degree angle, impressive), then the special "tap" direction is reported.

      Parameters

      Returns DetectSwipeEventReturn