We have a Backbone app that shows a newsfeed of posts: we do auto-loading, so as you scroll down past a certain point we load the next 10 posts in the feed. We do this by attaching an add event handler called addOne to the collection in our list view which appends a post element to the container like this:
this.$('#news-feed-list').append(postView.render().el);
When the user scrolls past a trigger point we call fetch() on the collection, and addOne renders each of the 10 posts fetched.
I believe this is a pretty standard Backbone approach: it does the job, but in some situations it would be handy if we could know when Backbone's finished rendering all the models it's received in the latest fetch() call.
For example, I'd like to add a tab shownig an alternative list view. When the user scrolls down a long way and then switches tabs I'd like to preserve the existing height of the container so the page doesn't jump. When each batch of posts has been rendered I'd like to be able to measure the remaining height in the container and fetch another batch of posts to fill any leftover space.
Can anyone tell us if Backbone has an event like that? Doesn't seem to be any mention of one in the latest docs.