Spaces:
Sleeping
Sleeping
File size: 301 Bytes
4a288a7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | // @flow
import assert from 'assert';
export function indexTouches(touches: Array<Touch>, points: Array<Point>) {
assert(touches.length === points.length);
const obj = {};
for (let i = 0; i < touches.length; i++) {
obj[touches[i].identifier] = points[i];
}
return obj;
}
|