(event, node)
| 2597 | } |
| 2598 | |
| 2599 | function pointer(event, node) { |
| 2600 | event = sourceEvent(event); |
| 2601 | if (node === undefined) node = event.currentTarget; |
| 2602 | if (node) { |
| 2603 | var svg = node.ownerSVGElement || node; |
| 2604 | if (svg.createSVGPoint) { |
| 2605 | var point = svg.createSVGPoint(); |
| 2606 | point.x = event.clientX, point.y = event.clientY; |
| 2607 | point = point.matrixTransform(node.getScreenCTM().inverse()); |
| 2608 | return [point.x, point.y]; |
| 2609 | } |
| 2610 | if (node.getBoundingClientRect) { |
| 2611 | var rect = node.getBoundingClientRect(); |
| 2612 | return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop]; |
| 2613 | } |
| 2614 | } |
| 2615 | return [event.pageX, event.pageY]; |
| 2616 | } |
| 2617 | |
| 2618 | function pointers(events, node) { |
| 2619 | if (events.target) { // i.e., instanceof Event, not TouchList or iterable |
no test coverage detected