diff options
Diffstat (limited to 'client/components/sidebar/infiniteScrolling.js')
-rw-r--r-- | client/components/sidebar/infiniteScrolling.js | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/client/components/sidebar/infiniteScrolling.js b/client/components/sidebar/infiniteScrolling.js deleted file mode 100644 index df3b8901..00000000 --- a/client/components/sidebar/infiniteScrolling.js +++ /dev/null @@ -1,37 +0,0 @@ -var peakAnticipation = 200; - -Mixins.InfiniteScrolling = BlazeComponent.extendComponent({ - onCreated: function() { - this._nextPeak = Infinity; - }, - - setNextPeak: function(v) { - this._nextPeak = v; - }, - - getNextPeak: function() { - return this._nextPeak; - }, - - resetNextPeak: function() { - this._nextPeak = Infinity; - }, - - // To be overwritten by consumers of this mixin - reachNextPeak: function() { - - }, - - events: function() { - return [{ - scroll: function(evt) { - var domElement = evt.currentTarget; - var altitude = domElement.scrollTop + domElement.offsetHeight; - altitude += peakAnticipation; - if (altitude >= this.callFirstWith(null, 'getNextPeak')) { - this.callFirstWith(null, 'reachNextPeak'); - } - } - }]; - } -}); |