mpizenberg/elm-pointer-events/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

Pointer

Handling pointer events.

type alias Event =
{ isPrimary : Bool
, pointerId : Int
, pointer : Event
}

Type that get returned by a pointer event.

onDown : (Event -> msg) -> Attribute msg

Listen to pointerdown events.

onMove : (Event -> msg) -> Attribute msg

Listen to pointermove events.

onUp : (Event -> msg) -> Attribute msg

Listen to pointerup events.

onWithOptions : String -> Options -> (Event -> msg) -> Attribute msg

Choose the mouse event to listen to, and specify the event options.

eventDecoder : Decoder Event

An Event decoder for pointer events.