dynamic-virtual-scroller
Advanced tools
Comparing version 3.0.19 to 3.0.20
{ | ||
"name": "dynamic-virtual-scroller", | ||
"version": "3.0.19", | ||
"version": "3.0.20", | ||
"description": "A virtual scroller for the web that can handle dynamic row and column sizes.", | ||
@@ -5,0 +5,0 @@ "main": "virtual-scroller.js", |
@@ -222,2 +222,6 @@ import {ATTRIBUTES, EVENTS, CLASSES, DATA} from "./constants"; | ||
scrollManager.subscribe(function (scrollLeft, scrollTop) { | ||
// renderManager might have already been set to null in API.destroy | ||
if (!renderManager) { | ||
return; | ||
} | ||
/* | ||
@@ -535,11 +539,17 @@ Optimization: Only render if the scroll delta is bigger than a row / column. | ||
destroy: function () { | ||
destroy: function (params) { | ||
config.container.find('[' + ATTRIBUTES.createdByScroller + '="' + config.scrollerId + '"]').remove(); | ||
config.canvas.empty(); | ||
params = validateParameters(params, { | ||
clearDOM: {type: 'boolean', default: true} | ||
}); | ||
config.container.removeClass([ | ||
CLASSES.scrolledX, CLASSES.scrolledY, CLASSES.scrollableX, CLASSES.scrollableY | ||
].join(' ')); | ||
if (params.clearDOM) { | ||
config.container.find('[' + ATTRIBUTES.createdByScroller + '="' + config.scrollerId + '"]').remove(); | ||
config.canvas.empty(); | ||
config.container.removeClass([ | ||
CLASSES.scrolledX, CLASSES.scrolledY, CLASSES.scrollableX, CLASSES.scrollableY | ||
].join(' ')); | ||
} | ||
config.container.off(namespacedEvent()); | ||
@@ -551,3 +561,3 @@ $(window).off(namespacedEvent()); | ||
renderManager.resetState(); | ||
renderManager.resetState(params); | ||
renderManager = null; | ||
@@ -554,0 +564,0 @@ |
Sorry, the diff of this file is too big to display
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
532549
7455