mpizenberg/elm-touch-events/3.0.2

NOTE: this package is not compatible with Elm 0.19.1

Touch

This module exposes types and functions common to both single and multi touch interactions.

type alias Event =
Event

Type alias for a touch event.

The properties touches, targetTouches and changedTouches are accessible through their corresponding functions.

To have more info about these properties and how to use them, please refer to the Mozilla documentation

changedTouches : Event -> Dict Int Coordinates

Retrieve the changedTouches property.

It returns a dictionary whose keys are the unique identifiers of the touches.

targetTouches : Event -> Dict Int Coordinates

Retrieve the targetTouches property.

It returns a dictionary whose keys are the unique identifiers of the touches.

touches : Event -> Dict Int Coordinates

Retrieve the touches property.

It returns a dictionary whose keys are the unique identifiers of the touches.

type alias Coordinates =
Coordinates

A simple type alias for the coordinates of a JavaScript Touch object.

clientPos : Coordinates -> ( Float, Float )

Retrieve the clientX and clientY coordinates.