(index)
| 42 | |
| 43 | // use a HOF so we have index in a closure |
| 44 | function touchStart(index) { |
| 45 | return function (event) { |
| 46 | currentIndex = index |
| 47 | startPos = getPositionX(event) |
| 48 | isDragging = true |
| 49 | animationID = requestAnimationFrame(animation) |
| 50 | slider.classList.add('grabbing') |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | function touchMove(event) { |
| 55 | if (isDragging) { |
no test coverage detected