From b37e14fc62670da112fe1671b7a8421a8d9b3595 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 30 May 2016 17:35:32 -0400 Subject: [PATCH] Remove snapping from scrollbar (people hate it) --- .../discourse/widgets/topic-timeline.js.es6 | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 b/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 index 5446f5d71af..6a5769b0f38 100644 --- a/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 +++ b/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 @@ -157,18 +157,9 @@ createWidget('timeline-scrollarea', { const $area = $('.timeline-scrollarea'); const areaTop = $area.offset().top; - const topic = this.attrs.topic; - const postStream = topic.get('postStream'); - const total = postStream.get('filteredPostsCount'); const percentage = clamp(parseFloat(y - areaTop) / $area.height()); - const current = clamp(Math.floor(total * percentage) + 1, 1, total); - // If viewing the last post consider it 100% - if (current === total) { - this.state.percentage = 1.0; - } else { - this.state.percentage = this._percentFor(topic, parseFloat(current)); - } + this.state.percentage = percentage; }, commit() {