(el, op, type, fn)
| 496 | } |
| 497 | |
| 498 | function touchy (el, op, type, fn) { |
| 499 | var touch = { |
| 500 | mouseup: 'touchend', |
| 501 | mousedown: 'touchstart', |
| 502 | mousemove: 'touchmove' |
| 503 | }; |
| 504 | var pointers = { |
| 505 | mouseup: 'pointerup', |
| 506 | mousedown: 'pointerdown', |
| 507 | mousemove: 'pointermove' |
| 508 | }; |
| 509 | var microsoft = { |
| 510 | mouseup: 'MSPointerUp', |
| 511 | mousedown: 'MSPointerDown', |
| 512 | mousemove: 'MSPointerMove' |
| 513 | }; |
| 514 | if (global.navigator.pointerEnabled) { |
| 515 | crossvent[op](el, pointers[type], fn); |
| 516 | } else if (global.navigator.msPointerEnabled) { |
| 517 | crossvent[op](el, microsoft[type], fn); |
| 518 | } else { |
| 519 | crossvent[op](el, touch[type], fn); |
| 520 | crossvent[op](el, type, fn); |
| 521 | } |
| 522 | } |
| 523 | |
| 524 | function whichMouseButton (e) { |
| 525 | if (e.touches !== void 0) { return e.touches.length; } |
no outgoing calls
no test coverage detected
searching dependent graphs…