UNPKG

323 BJavaScriptView Raw
1import sourceEvent from "./sourceEvent";
2import point from "./point";
3
4export default function(node, touches) {
5 if (touches == null) touches = sourceEvent().touches;
6
7 for (var i = 0, n = touches ? touches.length : 0, points = new Array(n); i < n; ++i) {
8 points[i] = point(node, touches[i]);
9 }
10
11 return points;
12}