larger buffer for autoscroll
This commit is contained in:
parent
a899e71ce5
commit
b5dea63774
2 changed files with 2 additions and 2 deletions
|
|
@ -28,7 +28,7 @@ app.views.Stream = Backbone.View.extend({
|
||||||
var $window = $(window);
|
var $window = $(window);
|
||||||
var distFromTop = $window.height() + $window.scrollTop();
|
var distFromTop = $window.height() + $window.scrollTop();
|
||||||
var distFromBottom = $(document).height() - distFromTop;
|
var distFromBottom = $(document).height() - distFromTop;
|
||||||
var bufferPx = 300;
|
var bufferPx = 500;
|
||||||
|
|
||||||
if(distFromBottom < bufferPx) {
|
if(distFromBottom < bufferPx) {
|
||||||
this.render();
|
this.render();
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ describe("app.views.Stream", function(){
|
||||||
spyOn(this.view, "isLoading").andReturn(false)
|
spyOn(this.view, "isLoading").andReturn(false)
|
||||||
|
|
||||||
spyOn($.fn, "height").andReturn(0);
|
spyOn($.fn, "height").andReturn(0);
|
||||||
spyOn($.fn, "scrollTop").andReturn(-400);
|
spyOn($.fn, "scrollTop").andReturn(-500);
|
||||||
|
|
||||||
this.view.infScroll();
|
this.view.infScroll();
|
||||||
expect(this.view.collection.fetch).not.toHaveBeenCalled();
|
expect(this.view.collection.fetch).not.toHaveBeenCalled();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue