draggify
v3.2.5
Published
Make HTMLElement draggable
Downloads
43
Readme
draggify
Make a HTMLElement draggable
- Draggify supports touch on mobile devices.
- Draggify is very fast.
usage
npm i -S draggify
import draggify from 'draggify';
draggify(document.querySelector('#element'), {
// Whether horizontal movement is allowed.
x: true,
// Whether vertical movement is allowed.
y: true,
// A callback performed in idle time after the dragging has finished.
idle: () => {
console.log('xxxx')
},
// Garbage collection.
gc: true
});
Have a try
https://yegao.github.io/draggify