forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTouchSwipe.json
More file actions
113 lines (102 loc) · 2.88 KB
/
TouchSwipe.json
File metadata and controls
113 lines (102 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
"meta": {
"docsUrl": "https://v1.quasar.dev/vue-directives/touch-swipe"
},
"value": {
"type": "Function",
"desc": "Handler for swipe (use a non-function to disable)",
"params": {
"details": {
"type": "Object",
"desc": "Event details",
"definition": {
"evt": {
"type": "Object",
"desc": "Original JS event Object",
"__exemption": [ "examples" ]
},
"touch": {
"type": "Boolean",
"desc": "Triggered by a touch event"
},
"mouse": {
"type": "Boolean",
"desc": "Triggered by a mouse event"
},
"direction": {
"type": "String",
"desc": "Direction of movement",
"values": [ "up", "right", "down", "left" ]
},
"duration": {
"type": "Number",
"desc": "How long it took to trigger the event (in milliseconds)",
"examples": [ 612 ]
},
"distance": {
"type": "Object",
"desc": "Absolute distance (in pixels) since movement started from initial point",
"definition": {
"x": {
"type": "Number",
"desc": "Absolute distance horizontally",
"examples": [ 231 ]
},
"y": {
"type": "Number",
"desc": "Absolute distance vertically",
"examples": [ 231 ]
}
}
}
}
}
},
"returns": null,
"examples": [ "v-touch-swipe=\"fnToCall\"", "v-touch-swipe=\"void 0\"" ]
},
"arg": {
"type": "String",
"desc": "x:y:z, where x is minimum velocity (dist/time; please use float without a dot, example: 6e-2 which is equivalent to 6 * 10^-2 = 0.06), y is minimum distance on first move on mobile, z is minimum distance on desktop until deciding if it's a swipe indeed",
"default": "6e-2:6:50",
"examples": [ "v-touch-swipe:7e-2:10:100=\"fnToCall\"" ]
},
"modifiers": {
"capture": {
"type": "Boolean",
"desc": "Use capture for touchstart event"
},
"mouse": {
"type": "Boolean",
"desc": "Listen for mouse events too"
},
"mouseCapture": {
"type": "Boolean",
"desc": "Use capture for mousedown event"
},
"horizontal": {
"type": "Boolean",
"desc": "Catch horizontal (left/right) movement"
},
"vertical": {
"type": "Boolean",
"desc": "Catch vertical (up/down) movement"
},
"up": {
"type": "Boolean",
"desc": "Catch swipe to up"
},
"right": {
"type": "Boolean",
"desc": "Catch swipe to right"
},
"down": {
"type": "Boolean",
"desc": "Catch swipe to down"
},
"left": {
"type": "Boolean",
"desc": "Catch swipe to left"
}
}
}