* * @param {TouchEvent|MouseEvent} e
(e)
| 113 | * @param {TouchEvent|MouseEvent} e |
| 114 | */ |
| 115 | function touchStart(e) { |
| 116 | e.preventDefault(); |
| 117 | touchStarted = true; |
| 118 | if (!rect) resize(); |
| 119 | const touch = e.type === "touchstart" ? e.touches[0] : e; |
| 120 | touchStartValue.x = touch.clientX; |
| 121 | touchStartValue.y = touch.clientY; |
| 122 | $scrollbar.classList.add("active"); |
| 123 | document.addEventListener("touchmove", touchMove, config); |
| 124 | document.addEventListener("mousemove", touchMove, config); |
| 125 | document.addEventListener("touchend", touchEnd, config); |
| 126 | document.addEventListener("mouseup", touchEnd, config); |
| 127 | document.addEventListener("touchcancel", touchEnd, config); |
| 128 | clearTimeout(scrollbarTimeoutHide); |
| 129 | } |
| 130 | |
| 131 | /** |
| 132 | * |
nothing calls this directly
no test coverage detected