@@ -76,7 +76,7 @@ angular.module('ui.sortable', [])
76
76
$timeout ( function ( ) {
77
77
// ensure that the jquery-ui-sortable widget instance
78
78
// is still bound to the directive's element
79
- if ( ! ! element . data ( 'ui-sortable ') ) {
79
+ if ( ! ! element . sortable ( 'instance ') ) {
80
80
element . sortable ( 'refresh' ) ;
81
81
}
82
82
} , 0 , false ) ;
@@ -87,7 +87,7 @@ angular.module('ui.sortable', [])
87
87
// since the drag has started, the element will be
88
88
// absolutely positioned, so we check its siblings
89
89
var siblings = ui . item . siblings ( ) ;
90
- angular . element ( e . target ) . data ( 'ui-sortable ') . floating = isFloating ( siblings ) ;
90
+ angular . element ( e . target ) . sortable ( 'instance ') . floating = isFloating ( siblings ) ;
91
91
}
92
92
93
93
// Save the starting position of dragged item
@@ -263,13 +263,13 @@ angular.module('ui.sortable', [])
263
263
scope . $watch ( 'uiSortable' , function ( newVal /*, oldVal*/ ) {
264
264
// ensure that the jquery-ui-sortable widget instance
265
265
// is still bound to the directive's element
266
- if ( ! ! element . data ( 'ui-sortable ') ) {
266
+ if ( ! ! element . sortable ( 'instance ') ) {
267
267
angular . forEach ( newVal , function ( value , key ) {
268
268
// if it's a custom option of the directive,
269
269
// handle it approprietly
270
270
if ( key in directiveOpts ) {
271
271
if ( key === 'ui-floating' && ( value === false || value === true ) ) {
272
- element . data ( 'ui-sortable ') . floating = value ;
272
+ element . sortable ( 'instance ') . floating = value ;
273
273
}
274
274
275
275
opts [ key ] = value ;
0 commit comments