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
{{ message }}
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+12-5Lines changed: 12 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,11 @@ This directive allows you to sort an array with drag & drop.
6
6
7
7
- JQuery
8
8
- JQueryUI
9
+
- AngularJS
10
+
11
+
**Notes:**
12
+
> JQuery must be included before AngularJS.
13
+
> JQueryUI dependecies include core, widget, mouse & sortable. Creating a [custom build](http://jqueryui.com/download/#!version=1.10&components=1110000010000000000000000000000000) will [greatly reduce](https://github.com/angular-ui/ui-sortable/issues/154#issuecomment-40279430) the required file size.
9
14
10
15
## Usage
11
16
@@ -73,16 +78,18 @@ $scope.sortableOptions = {
73
78
};
74
79
```
75
80
76
-
**Note:**`update` occurs before any model/scope changes but after the DOM position has been updated.
81
+
**Notes:**
82
+
*`update` is the appropriate place to cancel a sorting, since it occurs before any model/scope changes but after the DOM position has been updated.
77
83
So `ui.item.scope` and the directive's `ng-model`, are equal to the scope before the drag start.
84
+
* To [cancel a sorting between connected lists](https://github.com/angular-ui/ui-sortable/issues/107#issuecomment-33633638), `cancel` should be called inside the `update` callback of the originating list.
0 commit comments