dynamic-virtual-scroller
Advanced tools
Comparing version 3.0.13 to 3.0.14
{ | ||
"name": "dynamic-virtual-scroller", | ||
"version": "3.0.13", | ||
"version": "3.0.14", | ||
"description": "A virtual scroller for the web that can handle dynamic row and column sizes.", | ||
@@ -5,0 +5,0 @@ "main": "virtual-scroller.js", |
@@ -55,3 +55,2 @@ import validateParameters from './validateParameters'; | ||
container: undefined, | ||
shadowCount: 0 // How often did the shadow move during the drag process | ||
}; | ||
@@ -87,5 +86,26 @@ }; | ||
if ($.contains(attachedContainer.get(0), container.get(0)) === false) { | ||
if (dragState.currentIndex === -1) { | ||
return; | ||
} | ||
/* | ||
Row was dragged out | ||
*/ | ||
dragState.container | ||
.closest('.' + CLASSES.container) | ||
.data(DATA.API) | ||
.removeRowAt({rowIndex: dragState.currentIndex}); | ||
adapterConfig.removeDataOfRow({ | ||
row: $(el), | ||
rowIndex: dragState.currentIndex, | ||
scrollContainer: dragState.container.closest('.' + CLASSES.container), | ||
}); | ||
dragState = getCleanDragState(); | ||
return; | ||
} | ||
var scrollContainer = container.closest('.' + CLASSES.container); | ||
var scrollerIndexBefore = parseInt(el.attr(ATTRIBUTES.index)); | ||
if (dragState.currentIndex === -1) { | ||
@@ -136,22 +156,2 @@ /* | ||
drake.on('shadow', function (el, container, source) { | ||
if ($.contains(attachedContainer.get(0), container) === false) { | ||
/* | ||
Row was dragged out | ||
*/ | ||
if (dragState.currentIndex !== -1) { | ||
dragState.container | ||
.closest('.' + CLASSES.container) | ||
.data(DATA.API) | ||
.removeRowAt({rowIndex: dragState.currentIndex}); | ||
adapterConfig.removeDataOfRow({ | ||
row: $(el), | ||
rowIndex: dragState.currentIndex, | ||
scrollContainer: dragState.container.closest('.' + CLASSES.container), | ||
}); | ||
dragState = getCleanDragState(); | ||
} | ||
return; | ||
} | ||
dragState.shadowCount += 1; | ||
onElementMoved(el, container, source); | ||
@@ -161,5 +161,3 @@ }); | ||
drake.on('cancel', function (el, container, source) { | ||
if (dragState.shadowCount > 0) { | ||
onElementMoved(el, container, source); | ||
} | ||
onElementMoved(el, container, source); | ||
dragState = getCleanDragState(); | ||
@@ -166,0 +164,0 @@ }); |
Sorry, the diff of this file is too big to display
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
519082
7176