wisemapping-frontend/libraries/jquery.touchevent.js

15 lines
454 B
JavaScript
Raw Normal View History

// Passive event listeners
2022-08-13 19:42:20 +02:00
function registerTouchHandler(jQuery) {
jQuery.event.special.touchstart = {
setup: function (_, ns, handle) {
this.addEventListener("touchstart", handle, { passive: true });
}
};
jQuery.event.special.touchmove = {
setup: function (_, ns, handle) {
this.addEventListener("touchmove", handle, { passive: true });
}
};
}
2022-08-13 19:42:20 +02:00
export default registerTouchHandler;