forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQScrollObserver.json
More file actions
126 lines (118 loc) · 3.54 KB
/
QScrollObserver.json
File metadata and controls
126 lines (118 loc) · 3.54 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
114
115
116
117
118
119
120
121
122
123
124
125
126
{
"meta": {
"docsUrl": "https://v2.quasar.dev/vue-components/scroll-observer"
},
"props": {
"debounce": {
"type": [ "String", "Number" ],
"desc": "Debounce amount (in milliseconds)",
"examples": [ "0", "530" ],
"category": "behavior"
},
"axis": {
"type": "String",
"desc": "Axis on which to detect changes",
"values": [ "both", "vertical", "horizontal" ],
"default": "vertical",
"category": "behavior"
},
"scroll-target": {
"extends": "scroll-target"
}
},
"events": {
"scroll": {
"desc": "Emitted when scroll position changes",
"params": {
"details": {
"type": "Object",
"desc": "Scroll details",
"definition": {
"position": {
"type": "Object",
"required": true,
"desc": "Scroll offset (from top and left)",
"definition": {
"top": {
"type": "Number",
"required": true,
"desc": "Scroll offset from top (vertical)",
"examples": [ 120 ]
},
"left": {
"type": "Number",
"required": true,
"desc": "Scroll offset from left (horizontal)",
"examples": [ 10 ]
}
}
},
"direction": {
"type": "String",
"required": true,
"desc": "Direction of scroll",
"values": [ "up", "down", "left", "right" ]
},
"directionChanged": {
"type": "Boolean",
"required": true,
"desc": "Has scroll direction changed since event was last emitted?"
},
"delta": {
"type": "Object",
"required": true,
"desc": "Delta of distance (in pixels) since event was last emitted",
"definition": {
"top": {
"type": "Number",
"required": true,
"desc": "Vertical delta distance since event was last emitted",
"examples": [ 120 ]
},
"left": {
"type": "Number",
"required": true,
"desc": "Horizontal delta distance since event was last emitted",
"examples": [ 10 ]
}
}
},
"inflectionPoint": {
"type": "Object",
"required": true,
"desc": "Last scroll offset where scroll direction has changed",
"definition": {
"top": {
"type": "Number",
"required": true,
"desc": "Scroll offset from top (vertical)",
"examples": [ 120 ]
},
"left": {
"type": "Number",
"required": true,
"desc": "Scroll offset from left (horizontal)",
"examples": [ 10 ]
}
}
}
}
}
}
}
},
"methods": {
"trigger": {
"desc": "Emit a 'scroll' event",
"params": {
"immediately": {
"type": "Boolean",
"desc": "Skip over the debounce amount"
}
}
},
"getPosition": {
"desc": "Get current scroll details under the form of an Object: { position, direction, directionChanged, inflectionPoint }"
}
}
}