1.0.6 • Published 6 years ago
yy-sortable v1.0.6
yy-sortable
Vanilla drag-and-drop sortable list(s)
Features include:
- dragging and dropping between sortable and/or ordered lists (options.sort)
- three ways to handle dragging off lists:
- closest - find closest list
- cancel - return to original position before dragging
- delete - remove element from all lists
- lists that are copy-only or no-drop (options.copy and options.drop)
- custom ghost image and icon support so dragging looks nicer and isn't limited by browser
- search descendents for a className when determining where to sort or how to order (options.deepSearch)
- limit the number of elements in a sortable (options.maximum)
- robust event system based on eventemitter3 (i.e., add, remove, order, update, delete, and -pending versions of these events)
- ordered lists may be reverse ordered and ordered by a data-? setting
- dynamically add elements
- uses built in drag and drop API
Rationale
I tried many of the existing drag-and-drop libraries but could not find all the features I wanted in one neat package.
Super Simple Example
new Sortable(document.getElementById('sortme'))
Examples Showing Features
API Documentation
davidfig.github.io/sortable/jsdoc/
Installation
npm i yy-sortable
Influences
I was greatly influenced by the design of sortablejs, which was almost perfect.
license
MIT License
(c) 2018 YOPEY YOPEY LLC by David Figatner
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago
0.11.0
7 years ago
0.10.11
7 years ago
0.10.10
7 years ago
0.10.9
7 years ago
0.10.8
7 years ago
0.10.7
7 years ago
0.10.6
7 years ago
0.10.5
7 years ago
0.10.4
7 years ago
0.10.3
7 years ago
0.10.2
7 years ago
0.10.1
7 years ago
0.10.0
7 years ago
0.9.1
7 years ago
0.9.0
7 years ago
0.8.1
7 years ago
0.8.0
7 years ago
0.7.5
7 years ago
0.7.4
7 years ago
0.7.3
7 years ago
0.7.2
7 years ago
0.7.1
7 years ago
0.7.0
7 years ago
0.6.3
7 years ago
0.6.2
7 years ago
0.6.1
7 years ago
0.6.0
7 years ago
0.5.0
7 years ago