mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 14:47:56 +01:00
15 lines
454 B
JavaScript
15 lines
454 B
JavaScript
// Passive event listeners
|
|
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 });
|
|
}
|
|
};
|
|
}
|
|
export default registerTouchHandler; |