onscrolling
Advanced tools
Comparing version 2.0.0-beta.3 to 2.0.0-beta.4
@@ -1,2 +0,1 @@ | ||
'use strict'; | ||
// Module state | ||
@@ -122,7 +121,5 @@ let isListening = false; | ||
callbackQueue.x = callbackQueue.x.concat(callback); | ||
console.log('adding listener, callbackQueue.x.length', callbackQueue.x.length); | ||
} | ||
if (vertical) { | ||
callbackQueue.y = callbackQueue.y.concat(callback); | ||
console.log('adding listener, callbackQueue.y.length', callbackQueue.y.length); | ||
} | ||
@@ -141,5 +138,3 @@ return () => { | ||
if (index > -1) { | ||
console.log('pre callbackQueue.x.length', callbackQueue.x.length); | ||
callbackQueue.x = callbackQueue.x.toSpliced(index, 1); | ||
console.log('clean up horizontal; index', index, 'callbackQueue.x.length', callbackQueue.x.length); | ||
} | ||
@@ -150,5 +145,3 @@ } | ||
if (index > -1) { | ||
console.log('pre callbackQueue.y.length', callbackQueue.y.length); | ||
callbackQueue.y = callbackQueue.y.toSpliced(index, 1); | ||
console.log('clean up vertical; index', index, 'callbackQueue.y.length', callbackQueue.y.length); | ||
} | ||
@@ -158,3 +151,2 @@ } | ||
if (!callbackQueue.x.length && !callbackQueue.y.length) { | ||
console.log('no listeners left'); | ||
cancelTick(); | ||
@@ -161,0 +153,0 @@ disableScrollListener(); |
{ | ||
"name": "onscrolling", | ||
"version": "2.0.0-beta.3", | ||
"version": "2.0.0-beta.4", | ||
"description": "A better, smoother, more performant window.onscroll event interface using requestAnimationFrame for performance and mobile-compatibility", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
43616
15
448
0