Skip to content

Commit 5b349a7

Browse files
make aList and oList global
1 parent fdfb30b commit 5b349a7

File tree

1 file changed

+26
-27
lines changed

1 file changed

+26
-27
lines changed

tests/pointerevent.html

+26-27
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,32 @@
101101
let isStart = true, hasKeys = false
102102
let setEvents = new Set()
103103

104+
// sorted list: these are all numbers
105+
let aList = [
106+
'clientX','clientY',
107+
'force', // float 0.0 (no pressure) - 1.0 (max pressure)
108+
'radiusX','radiusY',
109+
'rotationAngle',
110+
'screenX',
111+
'screenY', // RFP = matches clientX/Y
112+
]
113+
let oList = {
114+
pointerId: "number", //
115+
isPrimary: "boolean", // RFP true
116+
pressure: "number", // RFP: 0 if not active, 0.5 if active
117+
mozPressure: "number", // RFP should always return 0.5 now
118+
pointerType: "string", // RFP mouse
119+
mozInputSource: "number", // RFP should be 1 now
120+
tangentialPressure: "number", // RFP 0
121+
tiltX: "number", // RFP 0
122+
tiltY: "number", // RFP 0
123+
twist: "number", // RFP 0
124+
width: "number", // RFP 1
125+
height: "number", // RFP 1
126+
altitudeAngle: "number",
127+
azimuthAngle: "number",
128+
}
129+
104130
function finish() {
105131
// check all events have been recorded
106132
// pointer
@@ -139,16 +165,6 @@
139165
addEvent(type)
140166
oTemp[input][type] = {}
141167

142-
// sorted list: these are all numbers
143-
let aList = [
144-
'clientX','clientY',
145-
'force', // float 0.0 (no pressure) - 1.0 (max pressure)
146-
'radiusX','radiusY',
147-
'rotationAngle',
148-
'screenX',
149-
'screenY', // RFP = matches clientX/Y
150-
]
151-
152168
try {
153169
let touch = event.touches[0]
154170
aList.forEach(function(k){
@@ -229,23 +245,6 @@
229245

230246
// isPrimary: https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary
231247
// pen/touch can be true or false: as discovered in tests
232-
233-
let oList = {
234-
pointerId: "number", //
235-
isPrimary: "boolean", // RFP true
236-
pressure: "number", // RFP: 0 if not active, 0.5 if active
237-
mozPressure: "number", // RFP should always return 0.5 now
238-
pointerType: "string", // RFP mouse
239-
mozInputSource: "number", // RFP should be 1 now
240-
tangentialPressure: "number", // RFP 0
241-
tiltX: "number", // RFP 0
242-
tiltY: "number", // RFP 0
243-
twist: "number", // RFP 0
244-
width: "number", // RFP 1
245-
height: "number", // RFP 1
246-
altitudeAngle: "number",
247-
azimuthAngle: "number",
248-
}
249248
let oEvent = {}
250249

251250
for (const k of Object.keys(oList)) {

0 commit comments

Comments
 (0)