Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mnmly/drag
Drag component
https://github.com/mnmly/drag
Last synced: 5 days ago
JSON representation
Drag component
- Host: GitHub
- URL: https://github.com/mnmly/drag
- Owner: mnmly
- Created: 2013-01-24T06:58:39.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-11-05T18:43:58.000Z (about 10 years ago)
- Last Synced: 2024-08-01T12:35:08.040Z (3 months ago)
- Language: JavaScript
- Size: 156 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
- awesome-starred - mnmly/drag - Drag component (others)
README
# drag
drag component
## Installation
$ component install mnmly/drag
## Events
- `dragstart` when drag starts
- `drag` when dragging
- `dragend` when drag finishes## API
- [Drag()](#drag)
- [Drag.bind()](#dragbind)
- [Drag.unbind()](#dragunbind)## Drag( el, options )
Turn `el` into draggable element.
### Options- `smooth` enables `translate3d` positioning
- `axis` constrains drag direction `x` or `y`
- `range` constrains value to its range## Drag.bind()
Bind event handlers
## Drag.unbind()
Unbind event handlers
## License
MIT