FIX: Timeline issues on sites with large headers

This commit is contained in:
Robin Ward
2016-06-03 17:19:06 -04:00
parent ee6cd3e4c4
commit 0f0bff3786
2 changed files with 3 additions and 5 deletions

View File

@@ -18,15 +18,13 @@ export default MountWidget.extend(Docking, {
dockBottom: this.dockBottom };
},
@observes('topic.highest_post_number')
@observes('topic.highest_post_number', 'loading')
newPostAdded() {
this.queueRerender(() => this.queueDockCheck());
},
dockCheck(info) {
if (this.get('loading')) { return; }
const topicTop = $('.container.posts').offset().top;
const topicTop = $('.container.posts').offset().top - $('#main').offset().top;
const topicBottom = $('#topic-bottom').offset().top;
const $timeline = this.$('.timeline-container');
const timelineHeight = $timeline.height() || 400;

View File

@@ -1,5 +1,5 @@
const helper = {
offset: () => window.pageYOffset || $('html').scrollTop()
offset: () => (window.pageYOffset || $('html').scrollTop()) - $('#main').offset().top
};
export default Ember.Mixin.create({