Okiba / DragEmitter
Emits drag events for all common pointers kinds (touch & mouse)
npm i --save @okiba/drag-emitter
Or import it directly in the browser
Untranspiled code 🛑
Okiba Core packages are not transpiled, so don't forget to transpile them with your favourite bundler. For example, using Babel with Webpack, you should prevent imports from okiba to be excluded from transpilation, like follows:
test: /\.js$/exclude: /node_modules\/.*/use:loader: 'babel-loader'options:presets: '@babel/preset-env'
const dragEmitter =dragEmitter
Element whose surface is used for drag events
Unbinds events from the element and deletes the reference. To be called when the instance is not needed anymore for cleanup.