TouchEvent is just a simple Script that will allow supporting touch event on all devices.
Demo: https://liimonx.github.io/TouchEvent/
npm i TouchEvent.js
Now add it to your project:
Webpack
import TouchEvent from 'TouchEvent'
HTML
<script src="./TouchEvent/dist/TouchEvent.js"></script>
new TouchEvent('.name_of_element', (event) => {
console.log(event.startX)
console.log(event.startY)
console.log(event.endX)
console.log(event.endY)
console.log(event.walkX)
console.log(event.walkY)
console.log(event..target)
})
TouchEvent.js is under MIT licence