Skip to content
generated from vuquangpham/boilw

Creating hold and drag effect for across devices :)

License

Notifications You must be signed in to change notification settings

vuquangpham/grab.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grab.js

Creating hold and drag effects for across devices

Getting started

Options

Name Default Description
id unique id for clarifying each instance
grab true enable grab event
type all support "mouse", "touch" or "all" for both
--- -- --
events.mousedown:(self) => {} function
events.mousemove:(self) => {} function
events.mouseup:(self) => {} function
--- -- --
events.touchstart:(self) => {} function
events.touchmove:(self) => {} function
events.touchend:(self) => {} function
--- -- --
events.down:(self) => {} function shared events, for both mouse or touch events
events.move:(self) => {} function
events.up:(self) => {} function
--- -- --
events.grab:(self) => {} function grab events

Methods of Grab

Name Parameter Description
create object create the instance
get id get the instance
destroy instance destroy the instance

Methods of instance

Name Parameters
on (name, callback) trigger events
destroy () destroy instance

Deployment

Run ./dev in live server

npm run dev

Build files from ./src to ./dist for production

npm run prod

Build files from ./src and ./dev to ./dist for production

npm run build

About

Creating hold and drag effect for across devices :)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published