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.
When using event callbacks ([start](http://api.jqueryui.com/sortable/#event-start)/[update](http://api.jqueryui.com/sortable/#event-update)/[stop](http://api.jqueryui.com/sortable/#event-stop)...), avoid manipulating DOM elements (especially the one with the ng-repeat attached).
91
91
The suggested pattern is to use callbacks for emmiting events and altering the scope (inside the 'Angular world').
92
92
93
-
#### Floating
93
+
#### ui-floating
94
+
95
+
**ui-floating** (default: undefined)
96
+
Description: Enables a workaround for smooth horizontal sorting.
***undefined**: Relies on jquery.ui to detect the list's orientation.
99
+
***false**: Forces jquery.ui.sortable to detect the list as vertical.
100
+
***true**: Forces jquery.ui.sortable to detect the list as horizontal.
101
+
***"auto"**: Detects on each drag `start` if the element is floating or not.
94
102
95
103
To have a smooth horizontal-list reordering, jquery.ui.sortable needs to detect the orientation of the list.
96
104
This detection takes place during the initialization of the plugin (and some of the checks include: whether the first item is floating left/right or if 'axis' parameter is 'x', etc).
This is useful for elements that their size is dependent to other page characteristics.
144
+
A representative example of such cases are `<table>``<tr>`s and `<td>`s.
127
145
128
-
####Attributes For Event Handling
146
+
### Attributes For Event Handling
129
147
130
148
To handle events with html bindings just define any expression to listed event attributes.
131
149
If you defined an attribute for this events and defined callback function in sortableOptions at the same time, the attribute based callback will be called first.
@@ -161,7 +179,7 @@ $scope.sortableOptions = {
161
179
</ul>
162
180
```
163
181
164
-
####Canceling
182
+
### Canceling
165
183
166
184
Inside the `update` callback, you can check the item that is dragged and cancel the sorting.
0 commit comments