Browse Source

Add onUnchoose after onchoose is introduced

pull/1033/head
Victor Ng KP 8 years ago
parent
commit
5dac5c4019
  1. 9
      README.md
  2. 5
      Sortable.js
  3. 4
      Sortable.min.js
  4. 2
      component.json
  5. 2
      package.json

9
README.md

@ -112,6 +112,11 @@ var sortable = new Sortable(el, {
evt.oldIndex; // element index within parent
},
// Element is unchosen
onUnchoose: function (/**Event*/evt) {
evt.oldIndex; // element index within parent
},
// Element dragging started
onStart: function (/**Event*/evt) {
evt.oldIndex; // element index within parent
@ -557,11 +562,11 @@ Link to the active instance.
```html
<!-- CDNJS :: Sortable (https://cdnjs.com/) -->
<script src="//cdnjs.cloudflare.com/ajax/libs/Sortable/1.4.2/Sortable.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/Sortable/1.5.2/Sortable.min.js"></script>
<!-- jsDelivr :: Sortable (http://www.jsdelivr.com/) -->
<script src="//cdn.jsdelivr.net/sortable/1.4.2/Sortable.min.js"></script>
<script src="//cdn.jsdelivr.net/sortable/1.5.2/Sortable.min.js"></script>
<!-- jsDelivr :: Sortable :: Latest (http://www.jsdelivr.com/) -->

5
Sortable.js

@ -851,6 +851,9 @@
_toggleClass(dragEl, this.options.ghostClass, false);
_toggleClass(dragEl, this.options.chosenClass, false);
// Drag stop event
_dispatchEvent(this, rootEl, 'unchoose', dragEl, rootEl, oldIndex);
if (rootEl !== parentEl) {
newIndex = _index(dragEl, options.draggable);
@ -1369,6 +1372,6 @@
// Export
Sortable.version = '1.4.2';
Sortable.version = '1.5.2';
return Sortable;
});

4
Sortable.min.js vendored

File diff suppressed because one or more lines are too long

2
component.json

@ -1,7 +1,7 @@
{
"name": "Sortable",
"main": "Sortable.js",
"version": "1.4.2",
"version": "1.5.2",
"homepage": "http://rubaxa.github.io/Sortable/",
"repo": "RubaXa/Sortable",
"authors": [

2
package.json

@ -1,7 +1,7 @@
{
"name": "sortablejs",
"exportName": "Sortable",
"version": "1.4.2",
"version": "1.5.2",
"devDependencies": {
"grunt": "*",
"grunt-version": "*",

Loading…
Cancel
Save