Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
stopScroll(bool) {
this.isStopped = bool;
bool ? RAF.remove(this.run) : RAF.add(this.run);
}
remove(element) {
var object = this.findElement(element);
if (!object) {
return;
}
object.virtual.off(this.onScroll.bind(this, element));
object.virtual.destroy();
_.remove(this.elements, function(item) {
return item.el === element;
});
if (this.elements.length === 0) {
this.isRunning = false;
RAF.remove(this.run);
}
}