Merge branch 'stable' into develop
This commit is contained in:
commit
858bdb0808
2 changed files with 4 additions and 3 deletions
|
|
@ -134,8 +134,8 @@ app.Router = Backbone.Router.extend({
|
|||
},
|
||||
|
||||
aspects: function() {
|
||||
app.aspects = new app.collections.Aspects(app.currentUser.get("aspects"));
|
||||
this.aspectsList = new app.views.AspectsList({ collection: app.aspects });
|
||||
app.aspects = app.aspects || new app.collections.Aspects(app.currentUser.get("aspects"));
|
||||
this.aspectsList = this.aspectsList || new app.views.AspectsList({ collection: app.aspects });
|
||||
this.aspectsList.render();
|
||||
this.aspects_stream();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -97,7 +97,8 @@ app.views.InfScroll = app.views.Base.extend({
|
|||
infScroll : function() {
|
||||
var $window = $(window),
|
||||
distFromBottom = $(document).height() - $window.height() - $window.scrollTop(),
|
||||
elementDistance = this.$el.children().last().offset().top - $window.scrollTop() - 500;
|
||||
lastElOffset = this.$el.children().last().offset(),
|
||||
elementDistance = lastElOffset ? lastElOffset.top - $window.scrollTop() - 500 : 1;
|
||||
|
||||
if(elementDistance <= 0 || distFromBottom < 500) {
|
||||
this.trigger("loadMore");
|
||||
|
|
|
|||
Loading…
Reference in a new issue