Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 72be8f3

Browse files
committed
Improved(README): Canceling section.
1 parent 93c4b7d commit 72be8f3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,18 @@ $scope.sortableOptions = {
7878
};
7979
```
8080

81-
**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.
8283
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.
8385

8486
## Examples
8587

8688
- [Simple Demo](http://codepen.io/thgreasi/pen/jlkhr)
87-
- [Connected Lists](http://codepen.io/thgreasi/pen/uFile)
88-
- [Filtering](http://codepen.io/thgreasi/pen/mzGbq) [details #113](https://github.com/angular-ui/ui-sortable/issues/113)
89-
- [Ordering](http://plnkr.co/edit/XPUzJjdvwE0QWQ6py6mQ?p=preview) [details #70](https://github.com/angular-ui/ui-sortable/issues/70)
90-
- [Cloning](http://codepen.io/thgreasi/pen/qmvhG) [details #139](https://github.com/angular-ui/ui-sortable/issues/139)
89+
- [Connected Lists](http://codepen.io/thgreasi/pen/uFile) & [Connected Lists Canceling](http://codepen.io/thgreasi/pen/IdvFc)
90+
- [Filtering](http://codepen.io/thgreasi/pen/mzGbq) ([details](https://github.com/angular-ui/ui-sortable/issues/113))
91+
- [Ordering](http://plnkr.co/edit/XPUzJjdvwE0QWQ6py6mQ?p=preview) ([details](https://github.com/angular-ui/ui-sortable/issues/70))
92+
- [Cloning](http://codepen.io/thgreasi/pen/qmvhG) ([details](https://github.com/angular-ui/ui-sortable/issues/139))
9193

9294
## Reporting Issues
9395

0 commit comments

Comments
 (0)