mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fixing scrolling height when mouse indicator position is locked. Expands padding to fit the bottom-most story. Thanks to @bdarnell and @dancarroll for the push. Fixes #230.
This commit is contained in:
parent
fe23985e6d
commit
23d8c87bda
1 changed files with 11 additions and 1 deletions
|
@ -98,10 +98,20 @@ NEWSBLUR.Views.StoryListView = Backbone.View.extend({
|
|||
},
|
||||
|
||||
show_no_more_stories: function() {
|
||||
var pane_height = NEWSBLUR.reader.$s.$story_pane.height();
|
||||
var indicator_position = NEWSBLUR.assets.preference('lock_mouse_indicator');
|
||||
var endbar_height = 20;
|
||||
if (indicator_position) {
|
||||
var last_visible_story = _.last(NEWSBLUR.assets.stories.visible());
|
||||
var last_story_height = last_visible_story && last_visible_story.story_view.$el.height() || 100;
|
||||
endbar_height = pane_height - indicator_position - last_story_height;
|
||||
if (endbar_height <= 20) endbar_height = 20;
|
||||
}
|
||||
|
||||
this.$('.NB-feed-story-endbar').remove();
|
||||
var $end_stories_line = $.make('div', {
|
||||
className: 'NB-feed-story-endbar'
|
||||
}).css('paddingBottom', NEWSBLUR.assets.preference('lock_mouse_indicator'));
|
||||
}).css('paddingBottom', endbar_height);
|
||||
|
||||
this.$el.append($end_stories_line);
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue