Skip to content

unify the touch and mouse event so you can handle the mouse event the `touch` way.

Notifications You must be signed in to change notification settings

joyfulljs/xtouch

Repository files navigation

xtouch

With XTouch, you only need to handle touch event only, it will just works fine on both touch device and mouse device or device that support both.

useage

import XTouch from "@joyfulljs/xtouch";

function onStart(e){};
function onMove(e){};
function onEnd(e){};

const capture = false; // { passive: false }
const unbind = XTouch(div, { onStart, onMove, onEnd, capture });

// unbind();

api

docs

license

MIT@elvinzhu

About

unify the touch and mouse event so you can handle the mouse event the `touch` way.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published