MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / touchEnd

Function touchEnd

src/components/scrollbar/index.js:175–186  ·  view source on GitHub ↗

* * @param {TouchEvent|MouseEvent} e

(e)

Source from the content-addressed store, hash-verified

173 * @param {TouchEvent|MouseEvent} e
174 */
175 function touchEnd(e) {
176 e.preventDefault();
177 touchStarted = false;
178 $scrollbar.classList.remove("active");
179 document.removeEventListener("touchmove", touchMove, config);
180 document.removeEventListener("mousemove", touchMove, config);
181 document.removeEventListener("touchend", touchEnd, config);
182 document.removeEventListener("mouseup", touchEnd, config);
183 document.removeEventListener("touchcancel", touchEnd, config);
184 if (typeof $scrollbar.onScrollEnd === "function") $scrollbar.onScrollEnd();
185 scrollbarTimeoutHide = setTimeout(hide, TIMEOUT);
186 }
187
188 function resize(render = true) {
189 rect = $scrollbar.getBoundingClientRect();

Callers

nothing calls this directly

Calls 3

onScrollEndMethod · 0.80
preventDefaultMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected