You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Element is dropped into the list from another list
58
-
onAdd:function (/**Event*/evt){
58
+
onAdd:function (/*Event*/evt){
59
59
var itemEl =evt.item; // dragged HTMLElement
60
60
itemEl.from; // previous list
61
61
},
62
62
63
63
// Changed sorting within list
64
-
onUpdate:function (/**Event*/evt){
64
+
onUpdate:function (/*Event*/evt){
65
65
var itemEl =evt.item; // dragged HTMLElement
66
66
},
67
67
68
68
// Called by any change to the list (add / update / remove)
69
-
onSort:function (/**Event*/evt){
69
+
onSort:function (/*Event*/evt){
70
70
var itemEl =evt.item; // dragged HTMLElement
71
71
},
72
72
73
73
// Element is removed from the list into another list
74
-
onRemove:function (/**Event*/evt){
74
+
onRemove:function (/*Event*/evt){
75
75
var itemEl =evt.item; // dragged HTMLElement
76
76
},
77
77
78
-
onFilter:function (/**Event*/evt){
79
-
var itemEl =evt.item; // HTMLElement on which was `mousedown|tapstart` event.
78
+
onFilter:function (/*Event*/evt){
79
+
var itemEl =evt.item; // HTMLElement receiving the `mousedown|tapstart` event.
80
80
}
81
81
});
82
82
```
@@ -118,7 +118,7 @@ You can also define whether lists can give away, give and keep a copy (`clone`),
118
118
119
119
* name: `String` — group name
120
120
* pull: `true|false|'clone'` — ability to move from the list. `clone` — copy the item, rather than move.
121
-
* put: `true|false|["foo", "bar"]` — whether elements can be added from other lists, or an array of group names from which elements can be taken
121
+
* put: `true|false|["foo", "bar"]` — whether elements can be added from other lists, or an array of group names from which elements can be taken. Demo: http://jsbin.com/naduvo/2/edit?html,js,output
122
122
123
123
124
124
---
@@ -227,15 +227,15 @@ Sortable.create(el, {
227
227
/**
228
228
* Get the order of elements. Called once during initialization.
229
229
* @param{Sortable}sortable
230
-
* @retruns {Array}
230
+
* @returns{Array}
231
231
*/
232
232
get:function (sortable) {
233
233
var order =localStorage.getItem(sortable.options.group);
234
234
return order ?order.split('|') : [];
235
235
},
236
236
237
237
/**
238
-
* Save the order of elements. Called every time at the drag end.
238
+
* Save the order of elements. Called onEnd (when the item is dropped).
0 commit comments