Skip to content

Commit 36cceb5

Browse files
committed
Added missing descriptive comments.
1 parent a6b9bd6 commit 36cceb5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/sortable.js

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ angular.module('ui.sortable', [])
4242
scope.$watch(attrs.ngModel+'.length', function() {
4343
// Timeout to let ng-repeat modify the DOM
4444
$timeout(function() {
45+
// ensure that the jquery-ui-sortable widget instance
46+
// is still bound to the directive's element
4547
if (!!element.data('ui-sortable')) {
4648
element.sortable('refresh');
4749
}
@@ -174,6 +176,8 @@ angular.module('ui.sortable', [])
174176
};
175177

176178
scope.$watch(attrs.uiSortable, function(newVal /*, oldVal*/) {
179+
// ensure that the jquery-ui-sortable widget instance
180+
// is still bound to the directive's element
177181
if (!!element.data('ui-sortable')) {
178182
angular.forEach(newVal, function(value, key) {
179183
if(callbacks[key]) {

0 commit comments

Comments
 (0)