angular-ui-sortable-multiselection
Advanced tools
Comparing version 0.4.1 to 0.5.0
{ | ||
"name": "angular-ui-sortable-multiselection", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"description": "This directive allows multiple element sorting in UI-Sortable.", | ||
@@ -5,0 +5,0 @@ "author": "https://github.com/thgreasi/ui-sortable-multiselection/graphs/contributors", |
{ | ||
"name": "angular-ui-sortable-multiselection", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"description": "This directive allows multiple element sorting in UI-Sortable.", | ||
@@ -5,0 +5,0 @@ "author": "https://github.com/thgreasi/ui-sortable-multiselection/graphs/contributors", |
@@ -8,2 +8,4 @@ ui-sortable-multiselection | ||
[Simple Demo pen with selection count](http://codepen.io/vanatallin/pen/zqXzmJ) | ||
[Simple Demo pen](http://codepen.io/thgreasi/pen/mJAcL) | ||
@@ -10,0 +12,0 @@ |
@@ -73,2 +73,4 @@ angular.module('ui.sortable.multiselection', []) | ||
function (selectedItemClass) { | ||
var uiSelectionCount; | ||
function fixIndex (oldPosition, newPosition, x) { | ||
@@ -145,3 +147,3 @@ if (oldPosition < x && (newPosition === undefined || (oldPosition < newPosition && x <= newPosition))) { | ||
} | ||
uiSelectionCount = result['ui-selection-count']; | ||
return result; | ||
@@ -175,2 +177,5 @@ }, | ||
//Calculate the selectionCount number and initialize the selectionCount attributes if dragging multiple elements | ||
var selectionCount = selectedIndexes ? selectedIndexes.length : 0; | ||
// Clone the selected items and to put them inside the helper | ||
@@ -185,2 +190,5 @@ var elements = selectedElements.clone(); | ||
var helper = angular.element('<' + helperTag + '/>'); | ||
if (uiSelectionCount && selectionCount > 1) { | ||
helper.addClass('ui-selection-count').attr('data-ui-selection-count', selectionCount); | ||
} | ||
return helper.append(elements); | ||
@@ -187,0 +195,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27275
467
46