1 | import sourceEvent from "./sourceEvent";
|
2 | import point from "./point";
|
3 |
|
4 | export default function(node, touches, identifier) {
|
5 | if (arguments.length < 3) identifier = touches, touches = sourceEvent().changedTouches;
|
6 |
|
7 | for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) {
|
8 | if ((touch = touches[i]).identifier === identifier) {
|
9 | return point(node, touch);
|
10 | }
|
11 | }
|
12 |
|
13 | return null;
|
14 | }
|