Browse Source

Merge branch 'dev' into gh-pages

pull/191/head
RubaXa 10 years ago
parent
commit
71dcf9e2ed
  1. 2
      Sortable.js
  2. 12
      ng-sortable.js

2
Sortable.js

@ -446,7 +446,7 @@
isOwner = (activeGroup === group),
canSort = options.sort;
if (!_silent &&
if (!_silent && activeGroup &&
(isOwner
? canSort || (revert = !rootEl.contains(dragEl))
: activeGroup.pull && groupPut && (

12
ng-sortable.js

@ -3,7 +3,7 @@
* @licence MIT
*/
angular.module('ng-sortable', [])
.constant('$version', '0.3.0')
.constant('$version', '0.3.1')
.directive('ngSortable', ['$parse', function ($parse) {
'use strict';
@ -104,12 +104,18 @@ angular.module('ng-sortable', [])
}
}));
$el.on('$destroy', function () {
sortable.destroy();
sortable = null;
});
if (!/{|}/.test(ngSortable)) { // todo: ugly
angular.forEach(['sort', 'disabled', 'draggable', 'handle', 'animation'], function (name) {
scope.$watch(ngSortable + '.' + name, function (value) {
options[name] = value;
sortable.option(name, value);
if (value !== void 0) {
options[name] = value;
sortable.option(name, value);
}
});
});
}

Loading…
Cancel
Save