Remove snapping from scrollbar (people hate it)

This commit is contained in:
Robin Ward 2016-05-30 17:35:32 -04:00
parent d2ebf0436c
commit b37e14fc62
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D
1 changed files with 1 additions and 10 deletions

View File

@ -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() {