Here it is: mpizenberg/elm-pointer-events
As pointed out in this reddit post there are currently at least 7 packages dealing with mouse/touch/pointer interactions:
- knledg/touch-events
- mbr/elm-mouse-events
- mpizenberg/elm-touch-events
- mpizenberg/elm-mouse-events
- Elm-Canvas/element-relative-mouse-events
- zwilias/elm-touch-events
- mpizenberg/elm-pointer-events
I’m trying to reduce the count and end the name conflicts by merging all mpizenberg packages into elm-pointer-events. My mouse and touch packages will not be updated to elm 0.19.
This version 2.0.0 has a much better cover of mouse/touch/pointer APIs. In addition, it covers Wheel events and partial support of Drag events (for file dropping use cases).
Regarding the Pointer API, a polyfill is also provided at mpizenberg/elm-pep to support Firefox < 59 and Safari. Thanks a lot to Rob for his contribution in making this apple-friendly!
This package aims at being a solid base for pointer-like events but does not go beyond. Meaning that gestures (swipe, pinch, …) are not directly supported. For those, I suggest looking at zwilias package.
Version 2.0.0 is focused on almost full cover of APIs. In future work, I’ll focus on being gesture-friendly, meaning work on performances and API suitability for implementing gesture packages on top of this.