MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / touchStart

Function touchStart

assets/js/clickanddrag.js:44–52  ·  view source on GitHub ↗
(index)

Source from the content-addressed store, hash-verified

42
43// use a HOF so we have index in a closure
44function 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
54function touchMove(event) {
55 if (isDragging) {

Callers 1

clickanddrag.jsFile · 0.85

Calls 1

getPositionXFunction · 0.85

Tested by

no test coverage detected