File tree Expand file tree Collapse file tree 6 files changed +47
-44
lines changed Expand file tree Collapse file tree 6 files changed +47
-44
lines changed Original file line number Diff line number Diff line change
1
+ export function setPointerCapture ( id ) {
2
+ return function ( el ) {
3
+ return function ( ) {
4
+ el . setPointerCapture ( id ) ;
5
+ } ;
6
+ } ;
7
+ }
8
+
9
+ export function releasePointerCapture ( id ) {
10
+ return function ( el ) {
11
+ return function ( ) {
12
+ el . releasePointerCapture ( id ) ;
13
+ } ;
14
+ } ;
15
+ }
16
+
17
+ export function hasPointerCapture ( id ) {
18
+ return function ( el ) {
19
+ return function ( ) {
20
+ return el . hasPointerCapture ( id ) ;
21
+ } ;
22
+ } ;
23
+ }
Original file line number Diff line number Diff line change
1
+ module Web.PointerEvent.Element
2
+ ( hasPointerCapture
3
+ , releasePointerCapture
4
+ , setPointerCapture
5
+ )
6
+ where
7
+ import Prelude
8
+ import Effect (Effect )
9
+ import Web.PointerEvent.PointerEvent (PointerId )
10
+ import Web.DOM.Element (Element )
11
+
12
+ foreign import setPointerCapture :: PointerId -> Element -> Effect Unit
13
+ foreign import releasePointerCapture :: PointerId -> Element -> Effect Unit
14
+ foreign import hasPointerCapture :: PointerId -> Element -> Effect Boolean
Original file line number Diff line number Diff line change
1
+ export function maxTouchPoints ( nav ) {
2
+ return function ( ) {
3
+ return nav . maxTouchPoints ;
4
+ } ;
5
+ }
Original file line number Diff line number Diff line change
1
+ module Web.PointerEvent.Navigator where
2
+
3
+ import Effect (Effect )
4
+ import Web.HTML.Navigator (Navigator )
5
+ foreign import maxTouchPoints :: Navigator -> Effect Int
Original file line number Diff line number Diff line change @@ -52,34 +52,4 @@ export function getCoalescedEvents(ev) {
52
52
53
53
export function getPredictedEvents ( ev ) {
54
54
return ev . getPredictedEvents ( ) ;
55
- }
56
-
57
- export function setPointerCapture ( id ) {
58
- return function ( el ) {
59
- return function ( ) {
60
- el . setPointerCapture ( id ) ;
61
- } ;
62
- } ;
63
- }
64
-
65
- export function releasePointerCapture ( id ) {
66
- return function ( el ) {
67
- return function ( ) {
68
- el . releasePointerCapture ( id ) ;
69
- } ;
70
- } ;
71
- }
72
-
73
- export function hasPointerCapture ( id ) {
74
- return function ( el ) {
75
- return function ( ) {
76
- return el . hasPointerCapture ( id ) ;
77
- } ;
78
- } ;
79
- }
80
-
81
- export function maxTouchPoints ( nav ) {
82
- return function ( ) {
83
- return nav . maxTouchPoints ;
84
- } ;
85
55
}
Original file line number Diff line number Diff line change @@ -9,14 +9,11 @@ module Web.PointerEvent.PointerEvent
9
9
, fromUIEvent
10
10
, getCoalescedEvents
11
11
, getPredictedEvents
12
- , hasPointerCapture
13
12
, height
14
13
, isPrimary
15
14
, pointerId
16
15
, pointerType
17
16
, pressure
18
- , releasePointerCapture
19
- , setPointerCapture
20
17
, tiltX
21
18
, tiltY
22
19
, toEvent
@@ -27,16 +24,12 @@ module Web.PointerEvent.PointerEvent
27
24
)
28
25
where
29
26
30
- import Prelude
31
27
import Data.Maybe (Maybe )
32
- import Effect (Effect )
33
28
import Unsafe.Coerce (unsafeCoerce )
34
29
import Web.Event.Event (Event )
35
30
import Web.Internal.FFI (unsafeReadProtoTagged )
36
31
import Web.UIEvent.UIEvent (UIEvent )
37
32
import Web.UIEvent.MouseEvent (MouseEvent )
38
- import Web.DOM.Element (Element )
39
- import Web.HTML.Navigator (Navigator )
40
33
41
34
foreign import data PointerEvent :: Type
42
35
data PointerType = Mouse | Touch | Pen
@@ -82,11 +75,4 @@ foreign import altitudeAngle :: PointerEvent -> Number
82
75
foreign import azimuthAngle :: PointerEvent -> Number
83
76
84
77
foreign import getCoalescedEvents :: PointerEvent -> Array PointerEvent
85
-
86
78
foreign import getPredictedEvents :: PointerEvent -> Array PointerEvent
87
-
88
- foreign import setPointerCapture :: PointerId -> Element -> Effect Unit
89
- foreign import releasePointerCapture :: PointerId -> Element -> Effect Unit
90
- foreign import hasPointerCapture :: PointerId -> Element -> Effect Boolean
91
-
92
- foreign import maxTouchPoints :: Navigator -> Effect Int
You can’t perform that action at this time.
0 commit comments