Skip to content

Commit

Permalink
Add support for pointer events (#30)
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Honeyman <hello@thomashoneyman.com>
  • Loading branch information
gbagan and thomashoneyman committed May 14, 2022
1 parent 4d28c0c commit b462b73
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"purescript-media-types": "^6.0.0",
"purescript-prelude": "^6.0.0",
"purescript-web-clipboard": "^4.0.0",
"purescript-web-touchevents": "^4.0.0"
"purescript-web-touchevents": "^4.0.0",
"purescript-web-pointerevents": "https://github.com/purescript-web/purescript-web-pointerevents.git#^1.0.0"
}
}
21 changes: 11 additions & 10 deletions src/DOM/HTML/Indexed.purs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import Web.TouchEvent (TouchEvent)
import Web.UIEvent.FocusEvent (FocusEvent)
import Web.UIEvent.KeyboardEvent (KeyboardEvent)
import Web.UIEvent.MouseEvent (MouseEvent)
import Web.PointerEvent (PointerEvent)
import Web.UIEvent.WheelEvent (WheelEvent)

type CSSPixel = Int
Expand Down Expand Up @@ -87,16 +88,16 @@ type TouchEvents r =
)

type PointerEvents r =
( onPointerOver :: Event
, onPointerEnter :: Event
, onPointerDown :: Event
, onPointerMove :: Event
, onPointerUp :: Event
, onPointerCancel :: Event
, onPointerOut :: Event
, onPointerLeave :: Event
, gotPointerCapture :: Event
, lostPointerCapture :: Event
( onPointerOver :: PointerEvent
, onPointerEnter :: PointerEvent
, onPointerDown :: PointerEvent
, onPointerMove :: PointerEvent
, onPointerUp :: PointerEvent
, onPointerCancel :: PointerEvent
, onPointerOut :: PointerEvent
, onPointerLeave :: PointerEvent
, onGotPointerCapture :: PointerEvent
, onLostPointerCapture :: PointerEvent
| r
)

Expand Down

0 comments on commit b462b73

Please sign in to comment.